- switched on multiplexing for all connections, not just daemon
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index a546778..2a5597e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -294,12 +294,12 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
                }
        }
 
-       if (pipe(recv_pipe) < 0) {
+       if (fd_pair(recv_pipe) < 0) {
                rprintf(FERROR,"pipe failed in do_recv\n");
                exit_cleanup(RERR_SOCKETIO);
        }
 
-       if (pipe(error_pipe) < 0) {
+       if (fd_pair(error_pipe) < 0) {
                rprintf(FERROR,"error pipe failed in do_recv\n");
                exit_cleanup(RERR_SOCKETIO);
        }
@@ -391,6 +391,10 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
 {
        extern int cvs_exclude;
        extern int am_sender;
+       extern int remote_version;
+
+       if (remote_version >= 23)
+               io_start_multiplex_out(f_out);
 
        setup_protocol(f_out, f_in);
 
@@ -412,6 +416,10 @@ int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
        char *local_name = NULL;
        extern int am_sender;
        extern int list_only;
+       extern int remote_version;
+
+       if (remote_version >= 23)
+               io_start_multiplex_in(f_in);
 
        setup_protocol(f_out,f_in);