diff options
author | Andreas Schneider <asn@samba.org> | 2011-02-28 14:32:54 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-02-28 19:00:08 +0100 |
commit | eece80e62c3f2132f8f88235d75c5a4328cf4e10 (patch) | |
tree | ffee5c33df25ca5521bb43157f0454402e1a8798 /source3/smbd | |
parent | bf18403c819f241578bde334d296f3e7d7c57389 (diff) | |
download | samba-eece80e62c3f2132f8f88235d75c5a4328cf4e10.tar.gz samba-eece80e62c3f2132f8f88235d75c5a4328cf4e10.tar.bz2 samba-eece80e62c3f2132f8f88235d75c5a4328cf4e10.zip |
s3-smbd: Pass tevent context to messaging functions.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Feb 28 19:00:08 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/server.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index dd715e993a..b1553028f4 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -84,12 +84,15 @@ static void smb_conf_updated(struct messaging_context *msg, struct server_id server_id, DATA_BLOB *data) { + struct tevent_context *ev_ctx = + talloc_get_type_abort(private_data, struct tevent_context); + DEBUG(10,("smb_conf_updated: Got message saying smb.conf was " "updated. Reloading.\n")); change_to_root_user(); reload_services(msg, smbd_server_conn->sock, False); if (am_parent) { - pcap_cache_reload(server_event_context(), msg, + pcap_cache_reload(ev_ctx, msg, &reload_pcap_change_notify); } } @@ -104,9 +107,12 @@ static void smb_pcap_updated(struct messaging_context *msg, struct server_id server_id, DATA_BLOB *data) { + struct tevent_context *ev_ctx = + talloc_get_type_abort(private_data, struct tevent_context); + DEBUG(10,("Got message saying pcap was updated. Reloading.\n")); change_to_root_user(); - reload_printers(server_event_context(), msg); + reload_printers(ev_ctx, msg); } /******************************************************************* @@ -752,12 +758,13 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent, messaging_register(msg_ctx, NULL, MSG_SHUTDOWN, msg_exit_server); messaging_register(msg_ctx, NULL, MSG_SMB_FILE_RENAME, msg_file_was_renamed); - messaging_register(msg_ctx, NULL, MSG_SMB_CONF_UPDATED, + messaging_register(msg_ctx, server_event_context(), MSG_SMB_CONF_UPDATED, smb_conf_updated); messaging_register(msg_ctx, NULL, MSG_SMB_STAT_CACHE_DELETE, smb_stat_cache_delete); messaging_register(msg_ctx, NULL, MSG_DEBUG, smbd_msg_debug); - messaging_register(msg_ctx, NULL, MSG_PRINTER_PCAP, smb_pcap_updated); + messaging_register(msg_ctx, server_event_context(), MSG_PRINTER_PCAP, + smb_pcap_updated); brl_register_msgs(msg_ctx); msg_idmap_register_msgs(msg_ctx); |