s3-winbind: Register handlers for domain online/offline messages.
authorAndreas Schneider <asn@cryptomilk.org>
Thu, 10 Oct 2013 08:02:27 +0000 (10:02 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 11 Oct 2013 09:50:08 +0000 (11:50 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10194

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/winbindd/winbindd.c
source3/winbindd/winbindd_dual.c

index 953e208e2a743d501d4cadd25d8a07adaa973ab2..50573ac328101c93f481200f75f36399728924b5 100644 (file)
@@ -1168,6 +1168,12 @@ static void winbindd_register_handlers(struct messaging_context *msg_ctx,
        messaging_register(msg_ctx, NULL,
                           MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus);
 
+       /* Handle domain online/offline messages for domains */
+       messaging_register(winbind_messaging_context(), NULL,
+                          MSG_WINBIND_DOMAIN_OFFLINE, winbind_msg_domain_offline);
+       messaging_register(winbind_messaging_context(), NULL,
+                          MSG_WINBIND_DOMAIN_ONLINE, winbind_msg_domain_online);
+
        messaging_register(msg_ctx, NULL,
                           MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
 
index 34896d57fabd7a6104b4abdfad0057e8fc3a7c43..972924ccbefd5b76a3dbd1993b71b3a090ed0df0 100644 (file)
@@ -1241,6 +1241,11 @@ NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
        messaging_deregister(winbind_messaging_context(),
                             MSG_DEBUG, NULL);
 
+       messaging_deregister(winbind_messaging_context(),
+                            MSG_WINBIND_DOMAIN_OFFLINE, NULL);
+       messaging_deregister(winbind_messaging_context(),
+                            MSG_WINBIND_DOMAIN_ONLINE, NULL);
+
        /* We have destroyed all events in the winbindd_event_context
         * in reinit_after_fork(), so clean out all possible pending
         * event pointers. */