The Samba-Bugzilla – Attachment 3239 Details for
Bug 5370
sockopts attempts to set options after the socket is open
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to move the setsockopt calls into socket.c
rsync-socket.diff (text/plain), 1.41 KB, created by
Gordon Tetlow
on 2008-04-02 17:51:51 UTC
(
hide
)
Description:
Patch to move the setsockopt calls into socket.c
Filename:
MIME Type:
Creator:
Gordon Tetlow
Created:
2008-04-02 17:51:51 UTC
Size:
1.41 KB
patch
obsolete
>diff -ur rsync-2.6.9.orig/clientserver.c rsync-2.6.9/clientserver.c >--- rsync-2.6.9.orig/clientserver.c 2006-10-23 17:36:42.000000000 -0700 >+++ rsync-2.6.9/clientserver.c 2008-04-02 15:09:32.000000000 -0700 >@@ -103,8 +103,6 @@ > if (fd == -1) > exit_cleanup(RERR_SOCKETIO); > >- set_socket_options(fd, sockopts); >- > ret = start_inband_exchange(user, path, fd, fd, argc); > > return ret ? ret : client_run(fd, fd, -1, argc, argv); >@@ -746,10 +744,6 @@ > > if (!am_server) { > set_socket_options(f_in, "SO_KEEPALIVE"); >- if (sockopts) >- set_socket_options(f_in, sockopts); >- else >- set_socket_options(f_in, lp_socket_options()); > set_nonblocking(f_in); > } > >diff -ur rsync-2.6.9.orig/socket.c rsync-2.6.9/socket.c >--- rsync-2.6.9.orig/socket.c 2006-10-31 11:21:57.000000000 -0800 >+++ rsync-2.6.9/socket.c 2008-04-02 15:08:58.000000000 -0700 >@@ -31,6 +31,7 @@ > #include <netinet/tcp.h> > > extern char *bind_address; >+extern char *sockopts; > extern int default_af_hint; > > #ifdef HAVE_SIGACTION >@@ -261,6 +262,7 @@ > s = -1; > continue; > } >+ set_socket_options(s, sockopts); > if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { > close(s); > s = -1; >@@ -375,6 +377,10 @@ > > setsockopt(s, SOL_SOCKET, SO_REUSEADDR, > (char *)&one, sizeof one); >+ if (sockopts) >+ set_socket_options(s, sockopts); >+ else >+ set_socket_options(s, lp_socket_options()); > > #ifdef IPV6_V6ONLY > if (resp->ai_family == AF_INET6) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5370
:
3239
|
3240