s3: Remove the smbd_messaging_context from load_printers
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 20:54:43 +0000 (22:54 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 21:37:47 +0000 (23:37 +0200)
source3/include/proto.h
source3/printing/load.c
source3/smbd/server_reload.c
source3/web/swat.c

index ace63aeabe3628513b28d49fcd843724156ec766..18b37543daea52d0e9134a7035b0375b2fb31562 100644 (file)
@@ -4396,7 +4396,8 @@ bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
 
 /* The following definitions come from printing/load.c  */
 
-void load_printers(void);
+void load_printers(struct tevent_context *ev,
+                  struct messaging_context *msg_ctx);
 
 /* The following definitions come from printing/lpq_parse.c  */
 
index 58ff8812f4eb69c7ea3244e34df2c52a07f81fd9..dd5d4ea2770be91c726356de4aa530f6c4a2345f 100644 (file)
@@ -52,11 +52,11 @@ static void add_auto_printers(void)
 /***************************************************************************
 load automatic printer services
 ***************************************************************************/
-void load_printers(void)
+void load_printers(struct tevent_context *ev,
+                  struct messaging_context *msg_ctx)
 {
        if (!pcap_cache_loaded()) {
-               pcap_cache_reload(server_event_context(),
-                                 server_messaging_context());
+               pcap_cache_reload(ev, msg_ctx);
        }
 
        add_auto_printers();
index 22a5675e07113605f3d738aee92388c4cd31291f..7512f8e482fa5b2a0478e80244157c9309e108bc 100644 (file)
@@ -79,7 +79,7 @@ void reload_printers(struct messaging_context *msg_ctx)
                }
        }
 
-       load_printers();
+       load_printers(server_event_context(), msg_ctx);
 
        TALLOC_FREE(server_info);
 }
index 720018d15db3e460966c2af3cc992e8a103539ed..1250204d03e837eb98b2cc9261de24ed9b0ba882 100644 (file)
@@ -491,7 +491,7 @@ static int save_reload(int snum)
                 return 0;
         }
        iNumNonAutoPrintServices = lp_numservices();
-       load_printers();
+       load_printers(server_event_context(), server_messaging_context());
 
        return 1;
 }
@@ -1434,7 +1434,7 @@ const char *lang_msg_rotate(TALLOC_CTX *ctx, const char *msgid)
        load_config(True);
        load_interfaces();
        iNumNonAutoPrintServices = lp_numservices();
-       load_printers();
+       load_printers(server_event_context(), server_messaging_context());
 
        cgi_setup(get_dyn_SWATDIR(), !demo_mode);