printf("total size is %.0f speedup is %.2f\n",
(double)stats.total_size,
(1.0*stats.total_size)/(stats.total_written+stats.total_read));
+
+ fflush(stdout);
+ fflush(stderr);
}
STRUCT_STAT st;
extern int orig_umask;
+ if (verbose > 2)
+ rprintf(FINFO,"get_local_name count=%d %s\n",
+ flist->count, name);
+
if (do_stat(name,&st) == 0) {
if (S_ISDIR(st.st_mode)) {
if (!push_dir(name, 0)) {
rprintf(FERROR,"mkdir %s : %s (1)\n",name,strerror(errno));
exit_cleanup(1);
} else {
- rprintf(FINFO,"created directory %s\n",name);
+ if (verbose > 0)
+ rprintf(FINFO,"created directory %s\n",name);
}
if (!push_dir(name, 0)) {
exit_cleanup(0);
}
+ set_nonblocking(f_out);
+ if (f_in != f_out)
+ set_nonblocking(f_in);
+
send_files(flist,f_out,f_in);
report(f_out);
io_flush();
close(recv_pipe[0]);
if (f_in != f_out) close(f_out);
+ set_nonblocking(f_in);
+
recv_files(f_in,flist,local_name,recv_pipe[1]);
report(f_in);
close(recv_pipe[1]);
io_close_input(f_in);
if (f_in != f_out) close(f_in);
+
+ set_nonblocking(f_out);
+
+ io_start_buffering(f_out);
+
generate_files(f_out,flist,local_name,recv_pipe[0]);
io_flush();
flist = send_file_list(f_out,argc,argv);
if (verbose > 3)
rprintf(FINFO,"file list sent\n");
+
+ set_nonblocking(f_out);
+ if (f_in != f_out)
+ set_nonblocking(f_in);
+
send_files(flist,f_out,f_in);
if (pid != -1) {
if (verbose > 3)
}
-int start_client(int argc, char *argv[])
+static int start_client(int argc, char *argv[])
{
char *p;
char *shell_machine = NULL;
char *shell_path = NULL;
char *shell_user = NULL;
- int pid;
+ int pid, ret;
int f_in,f_out;
extern int local_server;
extern int am_sender;
pid = do_cmd(shell_cmd,shell_machine,shell_user,shell_path,&f_in,&f_out);
-#if HAVE_SETLINEBUF
- setlinebuf(stdout);
- setlinebuf(stderr);
-#endif
+ ret = client_run(f_in, f_out, pid, argc, argv);
+
+ fflush(stdout);
+ fflush(stderr);
- return client_run(f_in, f_out, pid, argc, argv);
+ return ret;
}