* Copyright (C) 1996-2001 Andrew Tridgell
* Copyright (C) 1996 Paul Mackerras
* Copyright (C) 2001, 2002 Martin Pool <mbp@samba.org>
- * Copyright (C) 2003-2008 Wayne Davison
+ * Copyright (C) 2003-2009 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
}
break;
case FES_REDO:
+ if (read_batch) {
+ if (inc_recurse)
+ flist->in_progress++;
+ break;
+ }
if (inc_recurse)
flist->to_redo++;
flist_ndx_push(&redo_list, ndx);
* this, sender-side deletions were mostly happening at the end. */
void increment_active_files(int ndx, int itemizing, enum logcode code)
{
- /* TODO: tune these limits? */
- while (active_filecnt >= (active_bytecnt >= 128*1024 ? 10 : 50)) {
+ while (1) {
+ /* TODO: tune these limits? */
+ int limit = active_bytecnt >= 128*1024 ? 10 : 50;
+ if (active_filecnt < limit)
+ break;
check_for_finished_files(itemizing, code, 0);
+ if (active_filecnt < limit)
+ break;
if (iobuf_out_cnt)
io_flush(NORMAL_FLUSH);
else