diff options
author | Herb Lewis <herb@samba.org> | 2007-03-05 18:20:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:23 -0500 |
commit | 80a216970d1c287914d6ce4a8b120056d46bcd7d (patch) | |
tree | 225a586d33fbf0db092d97c2dad0b83da5f62450 /source3 | |
parent | a4bffe0559a7fb47a530d2020f0371a12b6a1d1e (diff) | |
download | samba-80a216970d1c287914d6ce4a8b120056d46bcd7d.tar.gz samba-80a216970d1c287914d6ce4a8b120056d46bcd7d.tar.bz2 samba-80a216970d1c287914d6ce4a8b120056d46bcd7d.zip |
r21704: open sockets immediately in process_loop
(This used to be commit 51b96ba79c9e7ca7a4cdf777fe160152ab35236e)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/winbindd.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 603cfeb85b..0edf3664b7 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -726,6 +726,15 @@ static void process_loop(void) int maxfd, listen_sock, listen_priv_sock, selret; struct timeval timeout, ev_timeout; + /* Open Sockets here to get stuff going ASAP */ + listen_sock = open_winbindd_socket(); + listen_priv_sock = open_winbindd_priv_socket(); + + if (listen_sock == -1 || listen_priv_sock == -1) { + perror("open_winbind_socket"); + exit(1); + } + /* We'll be doing this a lot */ /* Handle messages */ @@ -745,14 +754,6 @@ static void process_loop(void) /* Initialise fd lists for select() */ - listen_sock = open_winbindd_socket(); - listen_priv_sock = open_winbindd_priv_socket(); - - if (listen_sock == -1 || listen_priv_sock == -1) { - perror("open_winbind_socket"); - exit(1); - } - maxfd = MAX(listen_sock, listen_priv_sock); FD_ZERO(&r_fds); |