diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-27 05:05:14 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-27 05:05:14 +0000 |
commit | 3eb388185b97920933a1bd17753866815e38539b (patch) | |
tree | db536e4df8c842c7ae44b0fbeb001cb68edc9a6c /main.c | |
parent | 858fb9ebad77ceefc628344de26353d0a1936a9d (diff) | |
download | rsync-3eb388185b97920933a1bd17753866815e38539b.tar.gz |
a couple of changes to where the nonblocking settings are called.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -250,15 +250,15 @@ static void do_server_sender(int f_in, int f_out, int argc,char *argv[]) argv[0] = "."; } + set_nonblocking(f_out); + if (f_in != f_out) + set_nonblocking(f_in); + flist = send_file_list(f_out,argc,argv); if (!flist || flist->count == 0) { exit_cleanup(0); } - set_nonblocking(f_out); - if (f_in != f_out) - set_nonblocking(f_in); - send_files(flist,f_out,f_in); report(f_out); io_flush(); @@ -288,6 +288,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) if (f_in != f_out) close(f_out); set_nonblocking(f_in); + set_nonblocking(recv_pipe[1]); recv_files(f_in,flist,local_name,recv_pipe[1]); report(f_in); @@ -301,6 +302,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) if (f_in != f_out) close(f_in); set_nonblocking(f_out); + set_nonblocking(recv_pipe[0]); io_start_buffering(f_out); @@ -362,8 +364,12 @@ void start_server(int f_in, int f_out, int argc, char *argv[]) extern int cvs_exclude; extern int am_sender; + set_nonblocking(f_out); + if (f_in != f_out) + set_nonblocking(f_in); + setup_protocol(f_out, f_in); - + if (am_sender) { recv_exclude_list(f_in); if (cvs_exclude) |