s3:winbindd: also handle fd events from the winbind_event_context()
authorStefan Metzmacher <metze@samba.org>
Mon, 5 Jan 2009 10:53:29 +0000 (11:53 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 5 Jan 2009 14:07:36 +0000 (15:07 +0100)
metze

source3/winbindd/winbindd.c

index d06285b791bddc4ac7501c80ac42fca75dd19533..cf1dbf6f7261d7bd543ca22fce69316cbc83c086 100644 (file)
@@ -865,6 +865,13 @@ static void process_loop(void)
        timeout.tv_usec = 0;
 
        /* Check for any event timeouts. */
+       {
+               struct timeval now;
+               GetTimeOfDay(&now);
+
+               event_add_to_select_args(winbind_event_context(), &now,
+                                        &r_fds, &w_fds, &ev_timeout, &maxfd);
+       }
        if (get_timed_events_timeout(winbind_event_context(), &ev_timeout)) {
                timeout = timeval_min(&timeout, &ev_timeout);
        }
@@ -918,6 +925,8 @@ static void process_loop(void)
 
        /* selret > 0 */
 
+       run_events(winbind_event_context(), selret, &r_fds, &w_fds);
+
        ev = fd_events;
        while (ev != NULL) {
                struct winbindd_fd_event *next = ev->next;