summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-12-20 04:50:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:38 -0500
commit5d3456b22ea21f9f9728023578e5e6d58c1f5f3d (patch)
tree5aef995dda2d64820980ee3ee5058d5c216963d3 /source3/nsswitch/winbindd.c
parente59e787b4868acffad49b6264e319d585643d5ab (diff)
downloadsamba-5d3456b22ea21f9f9728023578e5e6d58c1f5f3d.tar.gz
samba-5d3456b22ea21f9f9728023578e5e6d58c1f5f3d.tar.bz2
samba-5d3456b22ea21f9f9728023578e5e6d58c1f5f3d.zip
r20270: Even with the dual daemon mode the parent winbindd
still needs to contact the DC's for non async requests like enumerate users/groups etc. Now that online DC detection is tied to async events we must enable the processing of events in the main loop of winbindd. Finally got rid of the last hard coded domain->initialized = 1 code in init_child_recv() - now all domain->initialized = True gets done only in the connection manager code when either we're online and have spoken to the DC or are offline and we know we can't talk to the DC. Jeremy. (This used to be commit b3c98057fbad182f6c05c5daec6cd258dd491064)
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 70875e08cb..049bc47aba 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -708,7 +708,7 @@ static void process_loop(void)
struct fd_event *ev;
fd_set r_fds, w_fds;
int maxfd, listen_sock, listen_priv_sock, selret;
- struct timeval timeout;
+ struct timeval timeout, ev_timeout;
/* We'll be doing this a lot */
@@ -716,8 +716,10 @@ static void process_loop(void)
message_dispatch();
+ run_events();
+
/* refresh the trusted domain cache */
-
+
rescan_trusted_domains();
/* Free up temporary memory */
@@ -745,6 +747,11 @@ static void process_loop(void)
timeout.tv_sec = WINBINDD_ESTABLISH_LOOP;
timeout.tv_usec = 0;
+ /* Check for any event timeouts. */
+ if (get_timed_events_timeout(&ev_timeout)) {
+ timeout = timeval_min(&timeout, &ev_timeout);
+ }
+
/* Set up client readers and writers */
state = winbindd_client_list();