summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-16 14:45:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:10 -0500
commit0570ce21ffd6c2a52bf701cd72fbb66ed7b3eb3e (patch)
tree2db422bf692d886547587308842e2ceebc6475bb /source3/nsswitch/winbindd.c
parent81acb2d8051544f3ca9cfdfb964a7560dfad6105 (diff)
downloadsamba-0570ce21ffd6c2a52bf701cd72fbb66ed7b3eb3e.tar.gz
samba-0570ce21ffd6c2a52bf701cd72fbb66ed7b3eb3e.tar.bz2
samba-0570ce21ffd6c2a52bf701cd72fbb66ed7b3eb3e.zip
r22943: More message_register -> messaging_register
(This used to be commit caece8975b0c2bad56d6a6a576bf8ce54626183f)
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index f4405981d2..e73fe79b1e 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -182,8 +182,11 @@ static void sigchld_handler(int signum)
}
/* React on 'smbcontrol winbindd reload-config' in the same way as on SIGHUP*/
-static void msg_reload_services(int msg_type, struct server_id src,
- void *buf, size_t len, void *private_data)
+static void msg_reload_services(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
{
/* Flush various caches */
flush_caches();
@@ -191,8 +194,11 @@ static void msg_reload_services(int msg_type, struct server_id src,
}
/* React on 'smbcontrol winbindd shutdown' in the same way as on SIGTERM*/
-static void msg_shutdown(int msg_type, struct server_id src,
- void *buf, size_t len, void *private_data)
+static void msg_shutdown(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
{
do_sigterm = True;
}
@@ -883,7 +889,9 @@ static int process_loop(int listen_sock, int listen_priv_sock)
DEBUG(3, ("got SIGHUP\n"));
- msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, NULL);
+ flush_caches();
+ reload_services_file();
+
do_sighup = False;
}
@@ -1137,14 +1145,18 @@ int main(int argc, char **argv, char **envp)
/* React on 'smbcontrol winbindd reload-config' in the same way
as to SIGHUP signal */
- message_register(MSG_SMB_CONF_UPDATED, msg_reload_services, NULL);
- message_register(MSG_SHUTDOWN, msg_shutdown, NULL);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_SMB_CONF_UPDATED, msg_reload_services);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_SHUTDOWN, msg_shutdown);
/* Handle online/offline messages. */
- message_register(MSG_WINBIND_OFFLINE, winbind_msg_offline, NULL);
- message_register(MSG_WINBIND_ONLINE, winbind_msg_online, NULL);
- message_register(MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus,
- NULL);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_WINBIND_OFFLINE, winbind_msg_offline);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_WINBIND_ONLINE, winbind_msg_online);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus);
poptFreeContext(pc);