X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/eb0144d79b4a52be68dd975cc64149ea4bd9080f..1e1ca25343206df0ad8dccaefdae0506c7817532:/main.c diff --git a/main.c b/main.c index 31d2faa6..0733a9aa 100644 --- a/main.c +++ b/main.c @@ -619,7 +619,7 @@ static void read_final_goodbye(int f_in, int f_out) } } - if (i != -1) { + if (i != NDX_DONE) { rprintf(FERROR, "Invalid packet at end of run (%d) [%s]\n", i, who_am_i()); exit_cleanup(RERR_PROTOCOL); @@ -695,8 +695,10 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) * points to an identical file won't be replaced by the referent. */ copy_links = copy_dirlinks = 0; +#ifdef SUPPORT_HARD_LINKS if (preserve_hard_links) init_hard_links(); +#endif if (fd_pair(error_pipe) < 0) { rsyserr(FERROR, errno, "pipe failed in do_recv"); @@ -768,7 +770,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) io_flush(FULL_FLUSH); if (protocol_version >= 24) { /* send a final goodbye message */ - write_int(f_out, -1); + write_int(f_out, NDX_DONE); } io_flush(FULL_FLUSH);