From: Wayne Davison Date: Tue, 22 May 2007 05:50:41 +0000 (+0000) Subject: Improved the error message when a dir-number is out of bounds. X-Git-Tag: v3.0.0pre1~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59fd2a5e7df7c431929230e9899427a034bfd545;p=thirdparty%2Frsync.git Improved the error message when a dir-number is out of bounds. --- diff --git a/rsync.c b/rsync.c index 9772b742..30c93ae0 100644 --- a/rsync.c +++ b/rsync.c @@ -166,9 +166,9 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr, if (ndx < 0 || ndx >= dir_flist->count) { ndx = NDX_FLIST_OFFSET - ndx; rprintf(FERROR, - "Invalid dir index: %d (%d - %d)\n", - ndx, NDX_FLIST_OFFSET, - NDX_FLIST_OFFSET - dir_flist->count); + "[%s] Invalid dir index: %d (%d - %d)\n", + who_am_i(), ndx, NDX_FLIST_OFFSET, + NDX_FLIST_OFFSET - dir_flist->count + 1); exit_cleanup(RERR_PROTOCOL); }