summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-12-13 17:03:21 +0100
committerVolker Lendecke <vl@samba.org>2011-12-14 17:34:21 +0100
commit78e629c5980a5c60e990bcde75aed31587729f3f (patch)
treeb7424202522c5e661cdae82395ebb9c0b858d4cc /source3/nmbd
parent1f0f8aaab5628580f9718d207e1c9cad6b9c3309 (diff)
downloadsamba-78e629c5980a5c60e990bcde75aed31587729f3f.tar.gz
samba-78e629c5980a5c60e990bcde75aed31587729f3f.tar.bz2
samba-78e629c5980a5c60e990bcde75aed31587729f3f.zip
s3: Remove a call to procid_self()
Pass messaging_context through the SIGHUP handler
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index a7b2c21ee6..afc7bbdf41 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -128,13 +128,15 @@ static void nmbd_sig_hup_handler(struct tevent_context *ev,
void *siginfo,
void *private_data)
{
+ struct messaging_context *msg = talloc_get_type_abort(
+ private_data, struct messaging_context);
+
DEBUG(0,("Got SIGHUP dumping debug info.\n"));
- msg_reload_nmbd_services(nmbd_messaging_context(),
- NULL, MSG_SMB_CONF_UPDATED,
- procid_self(), NULL);
+ msg_reload_nmbd_services(msg, NULL, MSG_SMB_CONF_UPDATED,
+ messaging_server_id(msg), NULL);
}
-static bool nmbd_setup_sig_hup_handler(void)
+static bool nmbd_setup_sig_hup_handler(struct messaging_context *msg)
{
struct tevent_signal *se;
@@ -142,7 +144,7 @@ static bool nmbd_setup_sig_hup_handler(void)
nmbd_event_context(),
SIGHUP, 0,
nmbd_sig_hup_handler,
- NULL);
+ msg);
if (!se) {
DEBUG(0,("failed to setup SIGHUP handler"));
return false;
@@ -929,7 +931,7 @@ static bool open_sockets(bool isdaemon, int port)
if (!nmbd_setup_sig_term_handler(nmbd_messaging_context()))
exit(1);
- if (!nmbd_setup_sig_hup_handler())
+ if (!nmbd_setup_sig_hup_handler(nmbd_messaging_context()))
exit(1);
/* get broadcast messages */