summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/smbd/server_reload.c12
3 files changed, 8 insertions, 8 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 4937c62024..85ade8f800 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5755,7 +5755,7 @@ int get_client_fd(void);
struct event_context *smbd_event_context(void);
struct messaging_context *smbd_messaging_context(void);
struct memcache *smbd_memcache(void);
-void reload_printers(void);
+void reload_printers(struct messaging_context *msg_ctx);
bool reload_services(bool test);
void exit_server(const char *const explanation);
void exit_server_cleanly(const char *const explanation);
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 36db09f810..2715c676e6 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2237,7 +2237,7 @@ void check_reload(time_t t)
|| (t-last_printer_reload_time < 0) )
{
DEBUG( 3,( "Printcap cache time expired.\n"));
- reload_printers();
+ reload_printers(smbd_messaging_context());
last_printer_reload_time = t;
}
}
diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c
index 4a499daf25..b2b296454b 100644
--- a/source3/smbd/server_reload.c
+++ b/source3/smbd/server_reload.c
@@ -29,7 +29,7 @@
/****************************************************************************
Reload printers
**************************************************************************/
-void reload_printers(void)
+void reload_printers(struct messaging_context *msg_ctx)
{
struct auth_serversupplied_info *server_info = NULL;
struct spoolss_PrinterInfo2 *pinfo2 = NULL;
@@ -63,18 +63,18 @@ void reload_printers(void)
DEBUG(3, ("removing stale printer %s\n", pname));
if (is_printer_published(server_info, server_info,
- smbd_messaging_context(),
+ msg_ctx,
NULL, lp_servicename(snum),
NULL, &pinfo2)) {
nt_printer_publish(server_info,
server_info,
- smbd_messaging_context(),
+ msg_ctx,
pinfo2,
DSPRINT_UNPUBLISH);
TALLOC_FREE(pinfo2);
}
- nt_printer_remove(server_info, server_info,
- smbd_messaging_context(), pname);
+ nt_printer_remove(server_info, server_info, msg_ctx,
+ pname);
lp_killservice(snum);
}
}
@@ -110,7 +110,7 @@ bool reload_services(bool test)
ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True);
- reload_printers();
+ reload_printers(smbd_messaging_context());
/* perhaps the config filename is now set */
if (!test)