extern int rsync_port;
extern int ignore_errors;
extern int kluge_around_eof;
-@@ -121,8 +124,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
- set_socket_options(fd, sockopts);
+@@ -125,8 +128,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+ #endif
ret = start_inband_exchange(fd, fd, user, remote_argc, remote_argv);
+ if (ret)
}
static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int am_client)
-@@ -265,6 +278,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -269,6 +282,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
if (verbose > 1)
print_child_argv("sending daemon args:", sargs);
io_printf(f_out, "%.*s\n", modlen, modname);
/* Old servers may just drop the connection here,
-@@ -290,6 +329,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -294,6 +333,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
* server to terminate the listing of modules.
* We don't want to go on and transfer
* anything; just exit. */
exit(0);
}
-@@ -297,6 +340,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -301,6 +344,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
rprintf(FERROR, "%s\n", line);
/* This is always fatal; the server will now
* close the socket. */
return -1;
}
-@@ -894,6 +941,9 @@ int start_daemon(int f_in, int f_out)
+@@ -898,6 +945,9 @@ int start_daemon(int f_in, int f_out)
if (exchange_protocols(f_in, f_out, line, sizeof line, 0) < 0)
return -1;
line[0] = 0;
if (!read_line_old(f_in, line, sizeof line))
return -1;
-@@ -905,6 +955,20 @@ int start_daemon(int f_in, int f_out)
+@@ -909,6 +959,20 @@ int start_daemon(int f_in, int f_out)
return -1;
}