diff options
author | Wayne Davison <wayned@samba.org> | 2009-10-12 09:03:42 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-10-12 09:10:50 -0700 |
commit | 41000dffc1e98a2f9fb19550f2c6bfc5f6290137 (patch) | |
tree | b55d9434f5855e1d54bfc0273db028a3e16c3fc5 /main.c | |
parent | d8587b4690b1987c02c71c136720f366abf250e6 (diff) | |
download | rsync-41000dffc1e98a2f9fb19550f2c6bfc5f6290137.tar.gz |
Avoid stopping multiplexed out over the message fd.
Use simpler multiplexed-out stopping method.
Make sure we can't false-match a socket fd.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -63,6 +63,8 @@ extern int whole_file; extern int read_batch; extern int write_batch; extern int batch_fd; +extern int sock_f_in; +extern int sock_f_out; extern int filesfrom_fd; extern int connect_timeout; extern pid_t cleanup_child_pid; @@ -841,6 +843,7 @@ static int do_recv(int f_in, int f_out, char *local_name) close(error_pipe[0]); if (f_in != f_out) close(f_out); + sock_f_out = -1; /* we can't let two processes write to the socket at one time */ io_end_multiplex_out(); @@ -891,6 +894,7 @@ static int do_recv(int f_in, int f_out, char *local_name) close(error_pipe[1]); if (f_in != f_out) close(f_in); + sock_f_in = -1; io_start_buffering_out(f_out); |