svn commit: samba r18525 - in branches/SAMBA_3_0/source/nsswitch: .

jra at samba.org jra at samba.org
Thu Sep 14 14:26:33 GMT 2006


Author: jra
Date: 2006-09-14 14:26:33 +0000 (Thu, 14 Sep 2006)
New Revision: 18525

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18525

Log:
Be a little less agressive about going back online when requested.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c	2006-09-14 13:37:17 UTC (rev 18524)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c	2006-09-14 14:26:33 UTC (rev 18525)
@@ -164,7 +164,7 @@
 }
 
 /****************************************************************
- Request init_dc_connection to set a domain online.
+ Requested to set a domain online.
 ****************************************************************/
 
 void set_domain_online_request(struct winbindd_domain *domain)
@@ -178,14 +178,19 @@
 		return;
 	}
 
-	/* If we were called from a message request, initiate
-	   a DC connection immediately. */
+	/* We've been told it's safe to go online and
+	   try and connect to a DC. But I don't believe it...
+	   Wait at least 5 seconds. Heuristics suck... */
 
-	init_dc_connection(domain);
+	if (!domain->check_online_event) {
+		DEBUG(5,("set_domain_online_request: no check_domain_online_handler "
+			"registered. Were we online (%d) ?\n", (int)domain->online ));
+	} else {
+		struct timeval tev;
 
-	if (domain->online == False) {
-		DEBUG(10,("set_domain_online_request: failed to init connection to DC. "
-			"Domain %s staying offline.\n", domain->name ));
+		GetTimeOfDay(&tev);
+		tev.tv_sec += 5;
+		set_event_dispatch_time("check_domain_online_handler", tev);
 	}
 }
 
@@ -906,6 +911,9 @@
 	if ( !open_any_socket_out(addrs, num_addrs, 5000, &fd_index, fd) ) 
 	{
 		for (i=0; i<num_dcs; i++) {
+			DEBUG(10, ("find_new_dc: open_any_socket_out failed for "
+				"domain %s address %s\n",
+				domain->name, inet_ntoa(dcs[i].ip) ));
 			winbind_add_failed_connection_entry(domain,
 				dcs[i].name, NT_STATUS_UNSUCCESSFUL);
 		}



More information about the samba-cvs mailing list