Optimized away 3 calls to strcmp().
[rsync/rsync.git] / clientserver.c
index 709057f..8a26ed5 100644 (file)
@@ -33,6 +33,7 @@ extern int verbose;
 extern int rsync_port;
 char *auth_user;
 extern int sanitize_paths;
+extern int filesfrom_fd;
 
 /**
  * Run a client connected to an rsyncd.  The alternative to this
@@ -424,6 +425,9 @@ static int rsync_module(int f_in, int f_out, int i)
         argp = argv;
        ret = parse_arguments(&argc, (const char ***) &argp, 0);
 
+       if (filesfrom_fd == 0)
+               filesfrom_fd = f_in;
+
        if (request) {
                if (*auth_user) {
                        rprintf(FINFO,"rsync %s %s from %s@%s (%s)\n",
@@ -514,7 +518,7 @@ int start_daemon(int f_in, int f_out)
 
        motd = lp_motd_file();
        if (motd && *motd) {
-               FILE *f = fopen(motd,"r" O_TEXT_STR);
+               FILE *f = fopen(motd,"r");
                while (f && !feof(f)) {
                        int len = fread(line, 1, sizeof(line)-1, f);
                        if (len > 0) {