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)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Oct 2013 08:14:51 +0000 (10:14 +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>
(cherry picked from commit fc5941622010843d823b5c245eccc68d1d3bce19)

source3/winbindd/winbindd.c
source3/winbindd/winbindd_dual.c

index 30771ebfb38b9d140188398f32b3bd9565625401..f447059248b70c025169499496390da2c5abf20e 100644 (file)
@@ -1078,6 +1078,12 @@ void winbindd_register_handlers(void)
        messaging_register(winbind_messaging_context(), 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(winbind_messaging_context(), NULL,
                           MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
 
index f4edf1dc02d0763240f993c407a576f95ac897a1..12dd8ebb85bb0fccd55d78b96d75aa9a6cf65368 100644 (file)
@@ -1223,6 +1223,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. */