Make use of the new sockopts variable.
authorWayne Davison <wayned@samba.org>
Thu, 26 Jan 2006 12:31:47 +0000 (12:31 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 26 Jan 2006 12:31:47 +0000 (12:31 +0000)
clientserver.c

index 978135d..4b4a08f 100644 (file)
@@ -45,6 +45,7 @@ extern int orig_umask;
 extern int no_detach;
 extern int default_af_hint;
 extern char *bind_address;
+extern char *sockopts;
 extern struct filter_list_struct server_filter_list;
 extern char *config_file;
 extern char *files_from;
@@ -98,6 +99,8 @@ int start_socket_client(char *host, char *path, int argc, char *argv[])
        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);
@@ -718,7 +721,10 @@ int start_daemon(int f_in, int f_out)
 
        if (!am_server) {
                set_socket_options(f_in, "SO_KEEPALIVE");
-               set_socket_options(f_in, lp_socket_options());
+               if (sockopts)
+                       set_socket_options(f_in, sockopts);
+               else
+                       set_socket_options(f_in, lp_socket_options());
                set_nonblocking(f_in);
        }