r21704: open sockets immediately in process_loop
authorHerb Lewis <herb@samba.org>
Mon, 5 Mar 2007 18:20:36 +0000 (18:20 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:23 +0000 (12:18 -0500)
(This used to be commit 51b96ba79c9e7ca7a4cdf777fe160152ab35236e)

source3/nsswitch/winbindd.c

index 603cfeb85be987406b824591822b3af133ed9bbe..0edf3664b7b02ca6bfb5eca80d98c757c35b94e9 100644 (file)
@@ -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);