mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
Try to set the socket options early for some OSs (like Sol 8) where they
can't be set after the listen(). Andrew Bartlett
This commit is contained in:
parent
2c73ae4ac7
commit
23b6772a24
@ -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)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user