Optimize server for special case of a long list of includes ("+") followed
[rsync/rsync.git] / clientserver.c
index eaa61ad..cf10b12 100644 (file)
@@ -36,6 +36,11 @@ int start_socket_client(char *host, char *path, int argc, char *argv[])
        extern int am_client;
        extern int am_sender;
 
+       if (*path == '/') {
+               rprintf(FERROR,"ERROR: The remote path must start with a module name\n");
+               return -1;
+       }
+
        p = strchr(host, '@');
        if (p) {
                user = host;
@@ -267,8 +272,10 @@ static int rsync_module(int fd, int i)
                free(request);
        }
 
+#if !TRIDGE
        /* don't allow the logs to be flooded too fast */
        if (verbose > 1) verbose = 1;
+#endif
 
        argc -= optind;
        argp = argv + optind;
@@ -390,6 +397,9 @@ int daemon_main(void)
                        close(i); 
                        open("/dev/null", O_RDWR);
                }
+
+               set_nonblocking(STDIN_FILENO);
+
                return start_daemon(STDIN_FILENO);
        }