X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/705132bceed54d18fb38aefa3f976b4c402cb7b8..24079e988fc31af4eba56cd2701fdc5a4154980d:/main.c diff --git a/main.c b/main.c index a8f285af..038214fd 100644 --- a/main.c +++ b/main.c @@ -29,6 +29,7 @@ extern int dry_run; extern int list_only; +extern int io_timeout; extern int am_root; extern int am_server; extern int am_sender; @@ -403,7 +404,7 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in cmd = rsh_env; if (!cmd) cmd = RSYNC_RSH; - cmd = strdup(cmd); /* MEMORY LEAK */ + cmd = strdup(cmd); /*MEMORY LEAK*/ if (!cmd) goto oom; @@ -1051,6 +1052,8 @@ void start_server(int f_in, int f_out, int argc, char *argv[]) if (protocol_version >= 23) io_start_multiplex_out(f_out); + if (am_daemon && io_timeout && protocol_version >= 31) + send_msg_int(MSG_IO_TIMEOUT, io_timeout); if (am_sender) { keep_dirlinks = 0; /* Must be disabled on the sender. */