diff options
author | Wayne Davison <wayned@samba.org> | 2009-01-17 13:54:52 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-01-17 13:59:08 -0800 |
commit | 4079d6a68495a837057f5171b26e45308e9e5681 (patch) | |
tree | d4d66946f506127ab6a87f1d2d287bda6cc3a874 /receiver.c | |
parent | df694f72ed3faf6d0738f95f9539dfde970ffcf9 (diff) | |
download | rsync-4079d6a68495a837057f5171b26e45308e9e5681.tar.gz |
Fixed a hang in the inc_recurse batch-reading code.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -387,15 +387,23 @@ static int we_want_redo(int desired_ndx) static int gen_wants_ndx(int desired_ndx) { static int next_ndx = -1; - static BOOL got_eof = 0; + static int done_cnt = 0; + static BOOL got_eof = False; + int flist_num = first_flist->flist_num; if (got_eof) return 0; while (next_ndx < desired_ndx) { + if (inc_recurse && flist_num <= done_cnt) + return 0; if (next_ndx >= 0) no_batched_update(next_ndx, False); if ((next_ndx = read_int(batch_gen_fd)) < 0) { + if (inc_recurse) { + done_cnt++; + continue; + } got_eof = True; return 0; } |