diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-31 23:17:11 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-09-28 07:36:18 +0200 |
commit | 94dc2c106ba6d33f3b66e0427b5d9ad04aeacc4f (patch) | |
tree | 771b07a12a11056950f2b8a1a984fb6a9f1aebdf /source3 | |
parent | 790ad3d1a4d494f8e98883aa4e1c16777170e874 (diff) | |
download | samba-94dc2c106ba6d33f3b66e0427b5d9ad04aeacc4f.tar.gz samba-94dc2c106ba6d33f3b66e0427b5d9ad04aeacc4f.tar.bz2 samba-94dc2c106ba6d33f3b66e0427b5d9ad04aeacc4f.zip |
s3: Lift smbd_messaging_context() from open_sockets_smbd()
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/server.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index ff59b3dbaf..07261b1e83 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -585,6 +585,7 @@ static bool smbd_open_one_socket(struct smbd_parent_context *parent, ****************************************************************************/ static bool open_sockets_smbd(struct smbd_parent_context *parent, + struct messaging_context *msg_ctx, const char *smb_ports) { int num_interfaces = iface_count(); @@ -715,19 +716,16 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent, /* Listen to messages */ - messaging_register(smbd_messaging_context(), NULL, - MSG_SMB_SAM_SYNC, msg_sam_sync); - messaging_register(smbd_messaging_context(), NULL, - MSG_SHUTDOWN, msg_exit_server); - messaging_register(smbd_messaging_context(), NULL, - MSG_SMB_FILE_RENAME, msg_file_was_renamed); - messaging_register(smbd_messaging_context(), NULL, - MSG_SMB_CONF_UPDATED, smb_conf_updated); - messaging_register(smbd_messaging_context(), NULL, - MSG_SMB_STAT_CACHE_DELETE, smb_stat_cache_delete); - messaging_register(smbd_messaging_context(), NULL, - MSG_DEBUG, smbd_msg_debug); - brl_register_msgs(smbd_messaging_context()); + messaging_register(msg_ctx, NULL, MSG_SMB_SAM_SYNC, msg_sam_sync); + 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, + 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); + brl_register_msgs(msg_ctx); #ifdef CLUSTER_SUPPORT if (lp_clustering()) { @@ -736,8 +734,8 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent, #endif #ifdef DEVELOPER - messaging_register(smbd_messaging_context(), NULL, - MSG_SMB_INJECT_FAULT, msg_inject_fault); + messaging_register(msg_ctx, NULL, MSG_SMB_INJECT_FAULT, + msg_inject_fault); #endif if (dns_port != 0) { @@ -1236,7 +1234,7 @@ extern void build_options(bool screen); } parent->interactive = interactive; - if (!open_sockets_smbd(parent, ports)) + if (!open_sockets_smbd(parent, smbd_messaging_context(), ports)) exit_server("open_sockets_smbd() failed"); TALLOC_FREE(frame); |