X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/f3d6d4800b35fd65d2395defdb57fed16cea3e85..5463453489b58c47ea709d844ba80a1f657c3aa3:/sender.c diff --git a/sender.c b/sender.c index 0175c9e4..1c81ec1d 100644 --- a/sender.c +++ b/sender.c @@ -3,12 +3,11 @@ * * Copyright (C) 1996 Andrew Tridgell * Copyright (C) 1996 Paul Mackerras - * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * Copyright (C) 2003-2007 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,7 +25,7 @@ extern int verbose; extern int do_xfers; extern int am_server; extern int am_daemon; -extern int incremental; +extern int inc_recurse; extern int log_before_transfer; extern int stdout_format_has_i; extern int logfile_format_has_i; @@ -44,7 +43,6 @@ extern int batch_fd; extern int write_batch; extern struct stats stats; extern struct file_list *cur_flist, *first_flist; -extern char *stdout_format; /** * @file @@ -149,7 +147,7 @@ void successful_send(int ndx) void write_ndx_and_attrs(int f_out, int ndx, int iflags, uchar fnamecmp_type, char *buf, int len) { - write_int(f_out, ndx); + write_ndx(f_out, ndx); if (protocol_version < 29) return; write_shortint(f_out, iflags); @@ -181,17 +179,17 @@ void send_files(int f_in, int f_out) rprintf(FINFO, "send_files starting\n"); while (1) { - if (incremental) - send_extra_file_list(f_out, 1000); + if (inc_recurse) + send_extra_file_list(f_out, FILECNT_LOOKAHEAD); /* This call also sets cur_flist. */ ndx = read_ndx_and_attrs(f_in, f_out, &iflags, &fnamecmp_type, xname, &xlen); if (ndx == NDX_DONE) { - if (incremental && first_flist) { + if (inc_recurse && first_flist) { flist_free(first_flist); if (first_flist) { - write_int(f_out, NDX_DONE); + write_ndx(f_out, NDX_DONE); continue; } } @@ -199,7 +197,7 @@ void send_files(int f_in, int f_out) break; if (verbose > 2) rprintf(FINFO, "send_files phase=%d\n", phase); - write_int(f_out, NDX_DONE); + write_ndx(f_out, NDX_DONE); continue; } @@ -354,5 +352,5 @@ void send_files(int f_in, int f_out) match_report(); - write_int(f_out, NDX_DONE); + write_ndx(f_out, NDX_DONE); }