extern int dry_run;
extern int list_only;
+extern int io_timeout;
extern int am_root;
extern int am_server;
extern int am_sender;
extern int got_xfer_error;
extern int msgs2stderr;
extern int module_id;
+extern int read_only;
extern int copy_links;
extern int copy_dirlinks;
extern int copy_unsafe_links;
exit_cleanup(RERR_SYNTAX);
return;
}
- if (am_daemon && lp_read_only(module_id) && remove_source_files) {
+ if (am_daemon && read_only && remove_source_files) {
rprintf(FERROR,
"ERROR: --remove-%s-files cannot be used with a read-only module\n",
remove_source_files == 1 ? "source" : "sent");
close(error_pipe[0]);
/* We can't let two processes write to the socket at one time. */
- io_end_multiplex_out(False);
+ io_end_multiplex_out(MPLX_SWITCHING);
if (f_in != f_out)
close(f_out);
sock_f_out = -1;
am_generator = 1;
- io_end_multiplex_in(False);
+ io_end_multiplex_in(MPLX_SWITCHING);
if (write_batch && !am_server)
stop_write_batch();
argc, (long)getpid());
}
- if (am_daemon && lp_read_only(module_id)) {
+ if (am_daemon && read_only) {
rprintf(FERROR,"ERROR: module is read only\n");
exit_cleanup(RERR_SYNTAX);
return;
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. */
if (need_messages_from_generator)
io_start_multiplex_in(f_in);
+ else
+ io_start_buffering_in(f_in);
recv_filter_list(f_in);
do_server_sender(f_in, f_out, argc, argv);
} else
io_start_buffering_out(f_out);
if (protocol_version >= 31 || (!filesfrom_host && protocol_version >= 23))
io_start_multiplex_in(f_in);
+ else
+ io_start_buffering_in(f_in);
send_filter_list(f_out);
if (filesfrom_host)
filesfrom_fd = f_in;
io_start_multiplex_in(f_in);
if (need_messages_from_generator)
io_start_multiplex_out(f_out);
+ else
+ io_start_buffering_out(f_out);
}
send_filter_list(read_batch ? -1 : f_out);