- print the stats at the right place when uploading in the rsync
authorAndrew Tridgell <tridge@samba.org>
Sat, 16 May 1998 05:24:40 +0000 (05:24 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 16 May 1998 05:24:40 +0000 (05:24 +0000)
  daemon
- update spec file

main.c
packaging/redhat/5.0/rsync.spec

diff --git a/main.c b/main.c
index 0408f61..0a57af6 100644 (file)
--- a/main.c
+++ b/main.c
@@ -226,32 +226,32 @@ static void do_server_sender(int f_in, int f_out, int argc,char *argv[])
 
 static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
 {
-  int pid;
-  int status=0;
-  int recv_pipe[2];
-  extern int preserve_hard_links;
+       int pid;
+       int status=0;
+       int recv_pipe[2];
+       extern int preserve_hard_links;
+       extern int am_daemon;
 
-  if (preserve_hard_links)
-    init_hard_links(flist);
+       if (preserve_hard_links)
+               init_hard_links(flist);
 
-  if (pipe(recv_pipe) < 0) {
-    rprintf(FERROR,"pipe failed in do_recv\n");
-    exit(1);
-  }
+       if (pipe(recv_pipe) < 0) {
+               rprintf(FERROR,"pipe failed in do_recv\n");
+               exit(1);
+       }
   
 
-  if ((pid=do_fork()) == 0) {
-    recv_files(f_in,flist,local_name,recv_pipe[1]);
-    if (verbose > 2)
-      rprintf(FINFO,"receiver read %ld\n",(long)read_total());
-    exit_cleanup(0);
-  }
+       if ((pid=do_fork()) == 0) {
+               recv_files(f_in,flist,local_name,recv_pipe[1]);
+               if (am_daemon) report(-1);
+               exit_cleanup(0);
+       }
 
-  generate_files(f_out,flist,local_name,recv_pipe[0]);
+       generate_files(f_out,flist,local_name,recv_pipe[0]);
 
-  waitpid(pid, &status, 0);
+       waitpid(pid, &status, 0);
 
-  return status;
+       return status;
 }
 
 
@@ -296,7 +296,6 @@ static void do_server_recv(int f_in, int f_out, int argc,char *argv[])
        }
 
        status = do_recv(f_in,f_out,flist,local_name);
-       report(-1);
        exit_cleanup(status);
 }
 
index 0c335d2..9bf6a31 100644 (file)
@@ -1,12 +1,12 @@
 Summary: Program for efficient remote updates of files.
 Name: rsync
-Version: 2.0.6
+Version: 2.0.7
 Release: 1
 Copyright: GPL
 Group: Applications/Networking
-Source:        ftp://samba.anu.edu.au/pub/rsync/rsync-2.0.6.tar.gz
-URL: http://samba.anu.edu.au/cgi-bin/rsync
-Packager: John H Terpstra <jht@aquasoft.com.au>
+Source:        ftp://samba.anu.edu.au/pub/rsync/rsync-2.0.7.tar.gz
+URL: http://samba.anu.edu.au/rsync/
+Packager: John H Terpstra <jht@samba.anu.edu.au>
 BuildRoot: /tmp/rsync
 
 %description