summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-09-14 14:26:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:46 -0500
commit1e811453620ea35bcc1f2b481d1ebdc0778b282f (patch)
treee83918fb2ec5651b50c833752955c864b637e518 /source3/nsswitch
parent5077d280811a084d955b9d39bcb0d86faa80f680 (diff)
downloadsamba-1e811453620ea35bcc1f2b481d1ebdc0778b282f.tar.gz
samba-1e811453620ea35bcc1f2b481d1ebdc0778b282f.tar.bz2
samba-1e811453620ea35bcc1f2b481d1ebdc0778b282f.zip
r18525: Be a little less agressive about going back online when requested.
Jeremy. (This used to be commit 9a0066278c30b123eeaed8213294b6d81a339524)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_cm.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c
index d1556198f3..36748b0b11 100644
--- a/source3/nsswitch/winbindd_cm.c
+++ b/source3/nsswitch/winbindd_cm.c
@@ -164,7 +164,7 @@ static void set_domain_online(struct winbindd_domain *domain)
}
/****************************************************************
- 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 @@ void set_domain_online_request(struct winbindd_domain *domain)
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 @@ static BOOL find_new_dc(TALLOC_CTX *mem_ctx,
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);
}