X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/1732b6c03711f9584666b93bf2184bbc79ff6a3a..0abda1b176b0cb95f5a177d5206ddbada9f74787:/clientserver.c diff --git a/clientserver.c b/clientserver.c index 07576471..c690dba2 100644 --- a/clientserver.c +++ b/clientserver.c @@ -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);