Call link_stat() with its new arg (for --keep-dirlinks support).
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index 915d1df..c6a3165 100644 (file)
--- a/main.c
+++ b/main.c
@@ -84,7 +84,7 @@ void wait_process(pid_t pid, int *status)
                io_flush(FULL_FLUSH);
        }
 
-       if ((waited_pid == -1) && (errno == ECHILD)) {
+       if (waited_pid == -1 && errno == ECHILD) {
                /* status of requested child no longer available.
                 * check to see if it was processed by the sigchld_handler.
                 */
@@ -369,6 +369,12 @@ static void do_server_sender(int f_in, int f_out, int argc,char *argv[])
                        (long)getpid());
        }
 
+       if (am_daemon && lp_write_only(module_id) && am_sender) {
+               rprintf(FERROR, "ERROR: module is write only\n");
+               exit_cleanup(RERR_SYNTAX);
+               return;
+       }
+
        if (!relative_paths && !push_dir(dir)) {
                rsyserr(FERROR, errno, "push_dir#3 %s failed",
                        full_fname(dir));