diff -u -r --new-file --exclude=CVS rsync-1.6.5/cvs.log rsync-1.6.6/cvs.log --- rsync-1.6.5/cvs.log Tue Dec 16 09:26:19 1997 +++ rsync-1.6.6/cvs.log Tue Dec 16 18:20:16 1997 @@ -318,3 +318,49 @@ write yet the fd is still OK. + +**************************************** +Date: Tuesday December 16, 1997 @ 17:59 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv28373 + +Modified Files: + flist.c rsync.c +Log Message: +fixed a nasty bug in the handling of the --delete option when there +are duplicate file names in the list of files to be transferred +(eg. the user specifies the same file twice). + + + +**************************************** +Date: Tuesday December 16, 1997 @ 18:18 +Author: tridge + +Update of /data/cvs/rsync/lib +In directory samba:/tmp/cvs-serv13442 + +Modified Files: + zlib.c +Log Message: +Checker showed that zlib was using a element of its internal state +structure without initialising it. Although it looks harmless I've +added a bzero() to make absolutely sure that the code behaves +consistently across platforms. + + + +**************************************** +Date: Tuesday December 16, 1997 @ 18:20 +Author: rsync-bu + +Update of /data/cvs/rsync +In directory samba:/data/people/rsync-bugs/rsync + +Modified Files: + version.h +Log Message: +preparing for release of 1.6.6 + diff -u -r --new-file --exclude=CVS rsync-1.6.5/flist.c rsync-1.6.6/flist.c --- rsync-1.6.5/flist.c Tue Dec 16 09:09:28 1997 +++ rsync-1.6.6/flist.c Tue Dec 16 18:14:44 1997 @@ -560,22 +560,36 @@ } +/* we need this function because of the silly way in which duplicate + entries are handled in the file lists - we can't change this + without breaking existing versions */ +static int flist_up(struct file_list *flist, int i) +{ + while (!flist->files[i].name) i++; + return i; +} + + int flist_find(struct file_list *flist,struct file_struct *f) { - int low=0,high=flist->count-1; + int low=0,high=flist->count-1; + + if (flist->count <= 0) return -1; + + while (low != high) { + int mid = (low+high)/2; + int ret = file_compare(&flist->files[flist_up(flist, mid)],f); + if (ret == 0) return flist_up(flist, mid); + if (ret > 0) { + high=mid; + } else { + low=mid+1; + } + } - while (low != high) { - int mid = (low+high)/2; - int ret = file_compare(&flist->files[mid],f); - if (ret == 0) return mid; - if (ret > 0) - high=mid; - else - low=mid+1; - } - if (file_compare(&flist->files[low],f) == 0) - return low; - return -1; + if (file_compare(&flist->files[flist_up(flist,low)],f) == 0) + return flist_up(flist,low); + return -1; } diff -u -r --new-file --exclude=CVS rsync-1.6.5/lib/zlib.c rsync-1.6.6/lib/zlib.c --- rsync-1.6.5/lib/zlib.c Thu Oct 30 19:13:32 1997 +++ rsync-1.6.6/lib/zlib.c Tue Dec 16 18:18:38 1997 @@ -10,7 +10,7 @@ * - added Z_PACKET_FLUSH (see zlib.h for details) * - added inflateIncomp * - * $Id: zlib.c,v 1.6 1997/10/30 08:13:32 tridge Exp $ + * $Id: zlib.c,v 1.7 1997/12/16 18:18:02 tridge Exp $ */ @@ -600,6 +600,7 @@ } s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); if (s == Z_NULL) return Z_MEM_ERROR; + bzero(s, sizeof(*s)); strm->state = (struct internal_state FAR *)s; s->strm = strm; diff -u -r --new-file --exclude=CVS rsync-1.6.5/rsync.c rsync-1.6.6/rsync.c --- rsync-1.6.5/rsync.c Mon Dec 15 23:05:08 1997 +++ rsync-1.6.6/rsync.c Tue Dec 16 18:14:44 1997 @@ -548,10 +548,10 @@ strncmp(flist->files[j].name,last_name, strlen(last_name))==0) continue; last_name = flist->files[j].name; + if (!(local_file_list = send_file_list(-1,1,&last_name))) + continue; if (verbose > 1) fprintf(FINFO,"deleting in %s\n", last_name); - if (!(local_file_list = send_file_list(-1,1,&last_name))) - return; for (i=local_file_list->count-1;i>=0;i--) { if (!local_file_list->files[i].name) continue; diff -u -r --new-file --exclude=CVS rsync-1.6.5/version.h rsync-1.6.6/version.h --- rsync-1.6.5/version.h Tue Dec 16 09:26:08 1997 +++ rsync-1.6.6/version.h Tue Dec 16 18:20:08 1997 @@ -1 +1 @@ -#define VERSION "1.6.5" +#define VERSION "1.6.6"