From 1c1d83a5327b86042df7c33d075e05adff7a30f2 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Aug 2010 22:53:02 +0200 Subject: [PATCH] s3: Remove the smbd_messaging_context from pcap_cache_reload --- source3/include/proto.h | 3 ++- source3/printing/load.c | 6 ++++-- source3/printing/pcap.c | 6 +++--- source3/smbd/server_reload.c | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index f7dd829d4b1..ace63aeabe3 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -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 */ diff --git a/source3/printing/load.c b/source3/printing/load.c index 99b52261593..58ff8812f4e 100644 --- a/source3/printing/load.c +++ b/source3/printing/load.c @@ -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(); diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c index d8b716028e0..d9c2941abe5 100644 --- a/source3/printing/pcap.c +++ b/source3/printing/pcap.c @@ -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 diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c index 80e30c04b61..22a5675e071 100644 --- a/source3/smbd/server_reload.c +++ b/source3/smbd/server_reload.c @@ -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)) { -- 2.34.1