diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-08 15:02:29 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-08 18:09:33 +0200 |
commit | 7c7ffb70fb53c8cedd388c016836d13107f28ac1 (patch) | |
tree | cf79d25d1cd4b9b7c47d2b2c4e62789161bc60fe | |
parent | 89b4c905776fefc12c1e3cc4b1c47b64863e9f30 (diff) | |
download | samba-7c7ffb70fb53c8cedd388c016836d13107f28ac1.tar.gz samba-7c7ffb70fb53c8cedd388c016836d13107f28ac1.tar.bz2 samba-7c7ffb70fb53c8cedd388c016836d13107f28ac1.zip |
s3: Lift the smbd_messaging_context from reload_printers
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/smbd/process.c | 2 | ||||
-rw-r--r-- | source3/smbd/server_reload.c | 12 |
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) |