summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_dual.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-09-28 18:08:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:52 -0500
commit0f56237bc0e0da61c958eb964b6a02958e0d5cda (patch)
treedae01139eea090f7460c6c99466e08e6f60e57fe /source3/nsswitch/winbindd_dual.c
parente07df9be38de23f054fa06da8d6bb9929fe766e1 (diff)
downloadsamba-0f56237bc0e0da61c958eb964b6a02958e0d5cda.tar.gz
samba-0f56237bc0e0da61c958eb964b6a02958e0d5cda.tar.bz2
samba-0f56237bc0e0da61c958eb964b6a02958e0d5cda.zip
r18980: Be a little more intelligent about "startup_time",
move into the domain struct. Allow message to go online to set this state and cope with removing it. Jeremy. (This used to be commit 51f0e60cc3a652b0ff1658d4c07bfc9493fbc51a)
Diffstat (limited to 'source3/nsswitch/winbindd_dual.c')
-rw-r--r--source3/nsswitch/winbindd_dual.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index 317a103f33..976fff8ebe 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -613,7 +613,7 @@ static void child_msg_online(int msg_type, struct process_id src, void *buf, siz
to force a reconnect now. */
for (domain = domain_list(); domain; domain = domain->next) {
- DEBUG(5,("child_msg_online: marking %s online.\n", domain->name));
+ DEBUG(5,("child_msg_online: requesting %s to go online.\n", domain->name));
winbindd_flush_negative_conn_cache(domain);
set_domain_online_request(domain);
}
@@ -682,7 +682,6 @@ static BOOL fork_domain_child(struct winbindd_child *child)
int fdpair[2];
struct winbindd_cli_state state;
extern BOOL override_logfile;
- time_t startup_time;
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fdpair) != 0) {
DEBUG(0, ("Could not open child pipe: %s\n",
@@ -768,8 +767,8 @@ static BOOL fork_domain_child(struct winbindd_child *child)
if ( child->domain ) {
child->domain->startup = True;
+ child->domain->startup_time = time(NULL);
}
- startup_time = time(NULL);
while (1) {
@@ -787,7 +786,8 @@ static BOOL fork_domain_child(struct winbindd_child *child)
GetTimeOfDay(&now);
- if (child->domain && child->domain->startup && (now.tv_sec > startup_time + 30)) {
+ if (child->domain && child->domain->startup &&
+ (now.tv_sec > child->domain->startup_time + 30)) {
/* No longer in "startup" mode. */
DEBUG(10,("fork_domain_child: domain %s no longer in 'startup' mode.\n",
child->domain->name ));