- Got rid of the arg to the io_start_multiplex_{in,out}() calls.
[rsync/rsync.git] / clientserver.c
index 0757647..c690dba 100644 (file)
@@ -97,7 +97,8 @@ int start_socket_client(char *host, char *path, int argc, char *argv[])
        return ret < 0? ret : client_run(fd, fd, -1, argc, argv);
 }
 
-int start_inband_exchange(char *user, char *path, int f_in, int f_out, int argc)
+int start_inband_exchange(char *user, char *path, int f_in, int f_out, 
+                         int argc)
 {
        int i;
        char *sargs[MAX_ARGS];
@@ -197,7 +198,7 @@ int start_inband_exchange(char *user, char *path, int f_in, int f_out, int argc)
 
        if (protocol_version < 23) {
                if (protocol_version == 22 || !am_sender)
-                       io_start_multiplex_in(f_in);
+                       io_start_multiplex_in();
        }
 
        return 0;
@@ -449,17 +450,18 @@ static int rsync_module(int f_in, int f_out, int i)
 
        if (protocol_version < 23
            && (protocol_version == 22 || am_sender))
-               io_start_multiplex_out(f_out);
+               io_start_multiplex_out();
        else if (!ret) {
                /* We have to get I/O multiplexing started so that we can
                 * get the error back to the client.  This means getting
                 * the protocol setup finished first in later versions. */
                setup_protocol(f_out, f_in);
-               io_start_multiplex_out(f_out);
+               io_start_multiplex_out();
        }
 
        if (!ret) {
                option_error();
+               msleep(400);
                exit_cleanup(RERR_UNSUPPORTED);
        }
 
@@ -495,6 +497,8 @@ int start_daemon(int f_in, int f_out)
        char *motd;
        int i = -1;
 
+       io_set_sock_fds(f_in, f_out);
+
        if (!lp_load(config_file, 0))
                exit_cleanup(RERR_SYNTAX);