printing: remove unused arguments from load_printers()
authorStefan Metzmacher <metze@samba.org>
Wed, 23 May 2018 14:35:20 +0000 (16:35 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 14 Jun 2018 18:52:20 +0000 (20:52 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/printing/load.c
source3/printing/load.h
source3/printing/queue_process.c
source3/printing/spoolssd.c
source3/smbd/server_reload.c

index 238998d920d7d2b943b01734d4ef78c1e4394cf4..51495f970db6217af7bf284b0753a25cba487899 100644 (file)
@@ -62,8 +62,7 @@ static void add_auto_printers(void)
 /***************************************************************************
 load automatic printer services from pre-populated pcap cache
 ***************************************************************************/
-void load_printers(struct tevent_context *ev,
-                  struct messaging_context *msg_ctx)
+void load_printers(void)
 {
        SMB_ASSERT(pcap_cache_loaded(NULL));
 
index 4611e9748c2ddbea15e9d4d4738404d148c2c350..36e0a25a7dda340ddb50d0a1a7c7b3c8cc34b1bd 100644 (file)
@@ -22,7 +22,6 @@
 
 /* The following definitions come from printing/load.c  */
 
-void load_printers(struct tevent_context *ev,
-                  struct messaging_context *msg_ctx);
+void load_printers(void);
 
 #endif /* _PRINTING_LOAD_H_ */
index c4941d84ccd7007590ab73de141df64b8ea14680..76fd9349fb4514ed0ad21939dd4da75c8eb42922 100644 (file)
@@ -484,7 +484,7 @@ void printing_subsystem_update(struct tevent_context *ev_ctx,
 {
        if (background_lpq_updater_pid != -1) {
                if (pcap_cache_loaded(NULL)) {
-                       load_printers(ev_ctx, msg_ctx);
+                       load_printers();
                }
                if (force) {
                        /* Send a sighup to the background process.
index 2b08d580f356c1755ef1e5649d4083192c21e4df..ca1eda918790dc22233031def09eb0d3ca6c1fd5 100644 (file)
@@ -105,7 +105,7 @@ static void update_conf(struct tevent_context *ev,
 {
        change_to_root_user();
        lp_load_global(get_dyn_CONFIGFILE());
-       load_printers(ev, msg);
+       load_printers();
 
        spoolss_reopen_logs(spoolss_child_id);
        if (spoolss_child_id == 0) {
@@ -212,13 +212,9 @@ static void spoolss_chld_sig_hup_handler(struct tevent_context *ev,
                                         void *siginfo,
                                         void *pvt)
 {
-       struct messaging_context *msg_ctx;
-
-       msg_ctx = talloc_get_type_abort(pvt, struct messaging_context);
-
        change_to_root_user();
        DEBUG(1,("Reloading printers after SIGHUP\n"));
-       load_printers(ev, msg_ctx);
+       load_printers();
        spoolss_reopen_logs(spoolss_child_id);
 }
 
@@ -293,7 +289,7 @@ static bool spoolss_child_init(struct tevent_context *ev_ctx,
         * ourselves. If pcap has not been loaded yet, then ignore, we will get
         * a message as soon as the bq process completes the reload. */
        if (pcap_cache_loaded(NULL)) {
-               load_printers(ev_ctx, msg_ctx);
+               load_printers();
        }
 
        /* try to reinit rpc queues */
@@ -704,7 +700,7 @@ pid_t start_spoolssd(struct tevent_context *ev_ctx,
         * client enumeration anyway.
         */
        if (pcap_cache_loaded(NULL)) {
-               load_printers(ev_ctx, msg_ctx);
+               load_printers();
        }
 
        mem_ctx = talloc_new(NULL);
index 9b6209619c30b499ae04d8a854f7633026480616..f07ad9254720e5170b0d9e7c33e27406630cf143 100644 (file)
@@ -79,7 +79,7 @@ void delete_and_reload_printers(struct tevent_context *ev,
        reload_last_pcap_time = pcap_last_update;
 
        /* Get pcap printers updated */
-       load_printers(ev, msg_ctx);
+       load_printers();
 
        n_services = lp_numservices();
        pnum = lp_servicenumber(PRINTERS_NAME);
@@ -110,7 +110,7 @@ void delete_and_reload_printers(struct tevent_context *ev,
        }
 
        /* Make sure deleted printers are gone */
-       load_printers(ev, msg_ctx);
+       load_printers();
 
        talloc_free(frame);
 }