r20914: Sync up incorrect differences between 3.0.24 and 3.0
authorJeremy Allison <jra@samba.org>
Fri, 19 Jan 2007 20:05:02 +0000 (20:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:19 +0000 (12:17 -0500)
Jeremy.

source/nsswitch/winbindd_cm.c

index 2f913081e82e0375b6da489bc325a771f97a7b1a..cd9947d90e06563f7cf39abe2e9de443692a2e03 100644 (file)
@@ -434,10 +434,18 @@ void set_domain_online_request(struct winbindd_domain *domain)
                DEBUG(10,("set_domain_online_request: domain %s was globally offline.\n",
                        domain->name ));
 
+               domain->check_online_event = event_add_timed(
+                       winbind_event_context(), NULL, tev,
+                       "check_domain_online_handler",
+                       check_domain_online_handler,
+                       domain);
+
+               /* The above *has* to succeed for winbindd to work. */
+               if (!domain->check_online_event) {
+                       smb_panic("set_domain_online_request: failed to add online handler.\n");
+               }
        }
 
-       TALLOC_FREE(domain->check_online_event);
-
        GetTimeOfDay(&tev);
 
        /* Go into "startup" mode again. */
@@ -446,16 +454,7 @@ void set_domain_online_request(struct winbindd_domain *domain)
 
        tev.tv_sec += 5;
 
-       domain->check_online_event = event_add_timed(
-               winbind_event_context(), NULL, tev,
-               "check_domain_online_handler",
-               check_domain_online_handler,
-               domain);
-
-       /* The above *has* to succeed for winbindd to work. */
-       if (!domain->check_online_event) {
-               smb_panic("set_domain_online_request: failed to add online handler.\n");
-       }
+       set_event_dispatch_time(winbind_event_context(), "check_domain_online_handler", tev);
 }
 
 /****************************************************************