s3: Remove the smbd_messaging_context from pcap_cache_reload
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 20:53:02 +0000 (22:53 +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/printing/pcap.c
source3/smbd/server_reload.c

index f7dd829d4b1cb89f50bf144d90fba2af950709d3..ace63aeabe3628513b28d49fcd843724156ec766 100644 (file)
@@ -4467,7 +4467,8 @@ void notify_printer_byname(struct tevent_context *ev,
 
 /* The following definitions come from printing/pcap.c  */
 
-void pcap_cache_reload(void);
+void pcap_cache_reload(struct tevent_context *ev,
+                      struct messaging_context *msg_ctx);
 bool pcap_printername_ok(const char *printername);
 
 /* The following definitions come from printing/printing.c  */
index 99b52261593bd0870a44427a2179553d894fa9fb..58ff8812f4eb69c7ea3244e34df2c52a07f81fd9 100644 (file)
@@ -54,8 +54,10 @@ load automatic printer services
 ***************************************************************************/
 void load_printers(void)
 {
-       if (!pcap_cache_loaded())
-               pcap_cache_reload();
+       if (!pcap_cache_loaded()) {
+               pcap_cache_reload(server_event_context(),
+                                 server_messaging_context());
+       }
 
        add_auto_printers();
 
index d8b716028e0d4ec265bb0a3f645c8938f6923594..d9c2941abe5246a7422cfdc2c4f7d3a4afbb7392 100644 (file)
@@ -101,7 +101,8 @@ void pcap_cache_replace(const struct pcap_cache *pcache)
        }
 }
 
-void pcap_cache_reload(void)
+void pcap_cache_reload(struct tevent_context *ev,
+                      struct messaging_context *msg_ctx)
 {
        const char *pcap_name = lp_printcapname();
        bool pcap_reloaded = False;
@@ -120,8 +121,7 @@ void pcap_cache_reload(void)
 
 #ifdef HAVE_CUPS
        if (strequal(pcap_name, "cups")) {
-               pcap_reloaded = cups_cache_reload(server_event_context(),
-                                                 server_messaging_context());
+               pcap_reloaded = cups_cache_reload(ev, msg_ctx);
                goto done;
        }
 #endif
index 80e30c04b61afdf4d95c9a0ec98b4b532fb0068b..22a5675e07113605f3d738aee92388c4cd31291f 100644 (file)
@@ -40,7 +40,7 @@ void reload_printers(struct messaging_context *msg_ctx)
        NTSTATUS status;
        bool skip = false;
 
-       pcap_cache_reload();
+       pcap_cache_reload(server_event_context(), msg_ctx);
 
        status = make_server_info_system(talloc_tos(), &server_info);
        if (!NT_STATUS_IS_OK(status)) {