diff -u -r --new-file --exclude=CVS rsync-2.0.13/cvs.log rsync-2.0.14/cvs.log --- rsync-2.0.13/cvs.log Wed May 27 23:55:00 1998 +++ rsync-2.0.14/cvs.log Fri May 29 12:29:41 1998 @@ -5133,3 +5133,104 @@ Log Message: preparing for release of 2.0.13 + +**************************************** +Date: Thursday May 28, 1998 @ 11:58 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv900 + +Modified Files: + io.c +Log Message: +cosmetic fix. don't display a EOF error when displaying just the motd +from a rsync server + + + +**************************************** +Date: Thursday May 28, 1998 @ 15:05 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv13352 + +Modified Files: + rsync.c +Log Message: +don't do recursive deletion if the recurse option is not selected. + + + +**************************************** +Date: Thursday May 28, 1998 @ 16:29 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv22192 + +Modified Files: + loadparm.c +Log Message: +fix realloc call for systems that don't handle realloc(NULL, ...) + + + + +**************************************** +Date: Thursday May 28, 1998 @ 16:40 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv2627 + +Modified Files: + exclude.c io.c loadparm.c params.c proto.h rsync.c util.c +Log Message: +use Realloc instead of realloc + + + + + +**************************************** +Date: Friday May 29, 1998 @ 12:28 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv5179 + +Modified Files: + flist.c io.c +Log Message: +fixed a bug in the flist sending code that caused the flist sending to +get out of sync. + + + +**************************************** +Date: Friday May 29, 1998 @ 12:29 +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 2.0.14 + + +**************************************** +Date: Friday May 29, 1998 @ 12:29 +Author: rsync-bu + +Update of /data/cvs/rsync/packaging/redhat/5.0 +In directory samba:/data/people/rsync-bugs/rsync/packaging/redhat/5.0 + +Modified Files: + rsync.spec +Log Message: +preparing for release of 2.0.14 + diff -u -r --new-file --exclude=CVS rsync-2.0.13/exclude.c rsync-2.0.14/exclude.c --- rsync-2.0.13/exclude.c Wed May 27 23:54:32 1998 +++ rsync-2.0.14/exclude.c Fri May 29 12:29:12 1998 @@ -146,11 +146,7 @@ return; } - if (!*list) { - *list = (struct exclude_struct **)malloc(sizeof(struct exclude_struct *)*2); - } else { - *list = (struct exclude_struct **)realloc(*list,sizeof(struct exclude_struct *)*(len+2)); - } + *list = (struct exclude_struct **)Realloc(*list,sizeof(struct exclude_struct *)*(len+2)); if (!*list || !((*list)[len] = make_exclude(pattern, include))) out_of_memory("add_exclude"); diff -u -r --new-file --exclude=CVS rsync-2.0.13/flist.c rsync-2.0.14/flist.c --- rsync-2.0.13/flist.c Wed May 27 23:54:32 1998 +++ rsync-2.0.14/flist.c Fri May 29 12:29:12 1998 @@ -169,6 +169,11 @@ if (l1 > 0) flags |= SAME_NAME; if (l2 > 255) flags |= LONG_NAME; + /* we must make sure we don't send a zero flags byte or the other + end will terminate the flist transfer */ + if (flags == 0 && !S_ISDIR(file->mode)) flags |= FLAG_DELETE; + if (flags == 0) flags |= LONG_NAME; + write_byte(f,flags); if (flags & SAME_NAME) write_byte(f,l1); diff -u -r --new-file --exclude=CVS rsync-2.0.13/io.c rsync-2.0.14/io.c --- rsync-2.0.13/io.c Wed May 27 23:54:32 1998 +++ rsync-2.0.14/io.c Fri May 29 12:29:12 1998 @@ -32,10 +32,11 @@ static int multiplex_in_fd; static int multiplex_out_fd; static time_t last_io; - +static int eof_error=1; extern int verbose; extern int io_timeout; + int64 write_total(void) { return total_written; @@ -119,7 +120,9 @@ } if (n == 0) { - rprintf(FERROR,"EOF in read_timeout\n"); + if (eof_error) { + rprintf(FERROR,"EOF in read_timeout\n"); + } exit_cleanup(1); } @@ -142,7 +145,7 @@ } } -/* read from the file descriptor handing multiplexing - +/* read from the file descriptor handling multiplexing - return number of bytes read never return <= 0 */ static int read_unbuffered(int fd, char *buf, int len) @@ -220,10 +223,7 @@ if (n > (read_buffer_size - read_buffer_len)) { read_buffer_size += n; - if (!read_buffer) - read_buffer = (char *)malloc(read_buffer_size); - else - read_buffer = (char *)realloc(read_buffer,read_buffer_size); + read_buffer = (char *)Realloc(read_buffer,read_buffer_size); if (!read_buffer) out_of_memory("read check"); read_buffer_p = read_buffer; } @@ -482,8 +482,12 @@ int read_line(int f, char *buf, int maxlen) { + eof_error = 0; + while (maxlen) { + buf[0] = 0; read_buf(f, buf, 1); + if (buf[0] == 0) return 0; if (buf[0] == '\n') { buf[0] = 0; break; @@ -497,6 +501,9 @@ *buf = 0; return 0; } + + eof_error = 1; + return 1; } diff -u -r --new-file --exclude=CVS rsync-2.0.13/loadparm.c rsync-2.0.14/loadparm.c --- rsync-2.0.13/loadparm.c Sat May 16 00:10:48 1998 +++ rsync-2.0.14/loadparm.c Fri May 29 12:29:12 1998 @@ -47,7 +47,6 @@ #define BOOL int #define False 0 #define True 1 -#define Realloc realloc #define PTR_DIFF(p1,p2) ((ptrdiff_t)(((char *)(p1)) - (char *)(p2))) #define strequal(a,b) (strcasecmp(a,b)==0) #define BOOLSTR(b) ((b) ? "Yes" : "No") @@ -368,6 +367,7 @@ i = iNumServices; ServicePtrs = (service **)Realloc(ServicePtrs,sizeof(service *)*num_to_alloc); + if (ServicePtrs) pSERVICE(iNumServices) = (service *)malloc(sizeof(service)); diff -u -r --new-file --exclude=CVS rsync-2.0.13/packaging/redhat/5.0/rsync.spec rsync-2.0.14/packaging/redhat/5.0/rsync.spec --- rsync-2.0.13/packaging/redhat/5.0/rsync.spec Wed May 27 23:54:40 1998 +++ rsync-2.0.14/packaging/redhat/5.0/rsync.spec Fri May 29 12:29:32 1998 @@ -1,10 +1,10 @@ Summary: Program for efficient remote updates of files. Name: rsync -Version: 2.0.13 +Version: 2.0.14 Release: 1 Copyright: GPL Group: Applications/Networking -Source: ftp://samba.anu.edu.au/pub/rsync/rsync-2.0.13.tar.gz +Source: ftp://samba.anu.edu.au/pub/rsync/rsync-2.0.14.tar.gz URL: http://samba.anu.edu.au/rsync/ Packager: Andrew Tridgell BuildRoot: /tmp/rsync diff -u -r --new-file --exclude=CVS rsync-2.0.13/params.c rsync-2.0.14/params.c --- rsync-2.0.13/params.c Fri May 15 20:57:36 1998 +++ rsync-2.0.14/params.c Fri May 29 12:29:12 1998 @@ -77,7 +77,6 @@ #define BOOL int #define False 0 #define True 1 -#define Realloc realloc /* -------------------------------------------------------------------------- ** * Constants... diff -u -r --new-file --exclude=CVS rsync-2.0.13/proto.h rsync-2.0.14/proto.h --- rsync-2.0.13/proto.h Wed May 27 23:54:33 1998 +++ rsync-2.0.14/proto.h Fri May 29 12:29:13 1998 @@ -60,7 +60,6 @@ void write_buf(int f,char *buf,int len); void write_sbuf(int f,char *buf); void write_byte(int f,unsigned char c); -void write_flush(int f); int read_line(int f, char *buf, int maxlen); void io_printf(int fd, const char *format, ...); void io_start_multiplex_out(int fd); @@ -97,18 +96,6 @@ int main(int argc,char *argv[]); void match_sums(int f,struct sum_struct *s,struct map_struct *buf,OFF_T len); void match_report(void); -void *smb_mem_malloc(size_t size,char *file,int line); -char *smb_mem_strdup(char *s, char *file, int line); -int smb_mem_free(void *ptr,char *file,int line); -void smb_mem_write_info(void *ptr,FILE *outfile); -char *smb_mem_query_file(void *ptr); -int smb_mem_query_line(void *ptr); -int smb_mem_test(void *ptr); -void smb_mem_write_status(FILE *outfile); -void smb_mem_write_verbose(FILE *outfile); -void smb_mem_write_errors(FILE *outfile); -void smb_mem_set_multiplier(int multiplier); -void *smb_mem_resize(void *ptr,size_t newsize); void usage(int F); void parse_arguments(int argc, char *argv[]); void server_options(char **args,int *argc); @@ -160,7 +147,6 @@ void out_of_memory(char *str); void overflow(char *str); int set_modtime(char *fname,time_t modtime); -int set_blocking(int fd, int set); int create_directory_path(char *fname); int full_write(int desc, char *ptr, int len); int safe_read(int desc, char *ptr, int len); @@ -178,3 +164,4 @@ void strlower(char *s); int vslprintf(char *str, int n, const char *format, va_list ap); int slprintf(char *str, int n, char *format, ...); +void *Realloc(void *p, int size); diff -u -r --new-file --exclude=CVS rsync-2.0.13/rsync.c rsync-2.0.14/rsync.c --- rsync-2.0.13/rsync.c Wed May 27 23:54:33 1998 +++ rsync-2.0.14/rsync.c Fri May 29 12:29:13 1998 @@ -74,6 +74,7 @@ extern int force_delete; STRUCT_STAT st; int ret; + extern int recurse; if (do_unlink(fname) == 0 || errno == ENOENT) return 0; @@ -93,7 +94,8 @@ } if (do_rmdir(fname) == 0 || errno == ENOENT) return 0; - if (!force_delete || (errno != ENOTEMPTY && errno != EEXIST)) { + if (!force_delete || !recurse || + (errno != ENOTEMPTY && errno != EEXIST)) { rprintf(FERROR,"rmdir(%s) : %s\n", fname, strerror(errno)); return -1; } @@ -636,11 +638,7 @@ { if (dlist_len == dlist_alloc_len) { dlist_alloc_len += 1024; - if (!delete_list) { - delete_list = (struct delete_list *)malloc(sizeof(delete_list[0])*dlist_alloc_len); - } else { - delete_list = (struct delete_list *)realloc(delete_list, sizeof(delete_list[0])*dlist_alloc_len); - } + delete_list = (struct delete_list *)Realloc(delete_list, sizeof(delete_list[0])*dlist_alloc_len); if (!delete_list) out_of_memory("add_delete_entry"); } diff -u -r --new-file --exclude=CVS rsync-2.0.13/util.c rsync-2.0.14/util.c --- rsync-2.0.13/util.c Wed May 27 23:54:34 1998 +++ rsync-2.0.14/util.c Fri May 29 12:29:13 1998 @@ -553,3 +553,9 @@ return ret; } + +void *Realloc(void *p, int size) +{ + if (!p) return (void *)malloc(size); + return (void *)realloc(p, size); +} diff -u -r --new-file --exclude=CVS rsync-2.0.13/version.h rsync-2.0.14/version.h --- rsync-2.0.13/version.h Wed May 27 23:54:40 1998 +++ rsync-2.0.14/version.h Fri May 29 12:29:31 1998 @@ -1 +1 @@ -#define VERSION "2.0.13" +#define VERSION "2.0.14"