]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Try to set the socket options early for some OSs (like Sol 8) where they
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Aug 2001 12:52:05 +0000 (12:52 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 Aug 2001 12:52:05 +0000 (12:52 +0000)
can't be set after the listen().

Andrew Bartlett

source/smbd/server.c

index 6e9b9a48284813f40f91ce2ddb56f1997cc471d6..13071a5b65b88ce660d59c294af6281785e018ee 100644 (file)
@@ -158,7 +158,11 @@ max can be %d\n",
                        s = fd_listenset[i] = open_socket_in(SOCK_STREAM, port, 0, ifip->s_addr, True);
                        if(s == -1)
                                return False;
-                               /* ready to listen */
+
+                       /* ready to listen */
+                       set_socket_options(s,"SO_KEEPALIVE"); 
+                       set_socket_options(s,user_socket_options);
+      
                        if (listen(s, 5) == -1) {
                                DEBUG(0,("listen: %s\n",strerror(errno)));
                                close(s);
@@ -178,6 +182,9 @@ max can be %d\n",
                        return(False);
                
                /* ready to listen */
+               set_socket_options(s,"SO_KEEPALIVE"); 
+               set_socket_options(s,user_socket_options);
+
                if (listen(s, 5) == -1) {
                        DEBUG(0,("open_sockets: listen: %s\n",
                                 strerror(errno)));