aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2009-12-12 08:54:36 -0800
committerWayne Davison <wayned@samba.org>2009-12-12 08:54:36 -0800
commit0c2e8f93643fd94a8d388e4373c30331d0af75b4 (patch)
treeecabea325285f7094fab5adf98e68b53f41af734 /io.c
parent24079e988fc31af4eba56cd2701fdc5a4154980d (diff)
downloadandroid_external_rsync-0c2e8f93643fd94a8d388e4373c30331d0af75b4.tar.gz
android_external_rsync-0c2e8f93643fd94a8d388e4373c30331d0af75b4.tar.bz2
android_external_rsync-0c2e8f93643fd94a8d388e4373c30331d0af75b4.zip
Don't send MSG_ERROR_EXIT messages at the end of the transfer.
Added some debug output for MSG_ERROR_EXIT messages.
Diffstat (limited to 'io.c')
-rw-r--r--io.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/io.c b/io.c
index 9b1cdbcb..9aab9dce 100644
--- a/io.c
+++ b/io.c
@@ -1489,8 +1489,14 @@ static void read_a_msg(void)
}
break;
case MSG_ERROR_EXIT:
+ if (DEBUG_GTE(EXIT, 3))
+ rprintf(FINFO, "[%s] got MSG_ERROR_EXIT with %d bytes\n", who_am_i(), msg_bytes);
if (msg_bytes == 0) {
if (!am_sender && !am_generator) {
+ if (DEBUG_GTE(EXIT, 3)) {
+ rprintf(FINFO, "[%s] sending MSG_ERROR_EXIT (len 0)\n",
+ who_am_i());
+ }
send_msg(MSG_ERROR_EXIT, "", 0, 0);
io_flush(FULL_FLUSH);
}
@@ -1499,10 +1505,19 @@ static void read_a_msg(void)
data = perform_io(4, PIO_INPUT_AND_CONSUME);
val = IVAL(data, 0);
if (protocol_version >= 31) {
- if (am_generator)
+ if (am_generator) {
+ if (DEBUG_GTE(EXIT, 3)) {
+ rprintf(FINFO, "[%s] sending MSG_ERROR_EXIT with exit_code %d\n",
+ who_am_i(), val);
+ }
send_msg_int(MSG_ERROR_EXIT, val);
- else
+ } else {
+ if (DEBUG_GTE(EXIT, 3)) {
+ rprintf(FINFO, "[%s] sending MSG_ERROR_EXIT (len 0)\n",
+ who_am_i());
+ }
send_msg(MSG_ERROR_EXIT, "", 0, 0);
+ }
}
} else
goto invalid_msg;