aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-06-09 04:47:15 +0200
committerMattias Andrée <maandree@operamail.com>2014-06-09 04:47:15 +0200
commitf31e7364a4ca0c868e5f1f9273abb14c873e3299 (patch)
tree3e5eea284f381206a480a1cde6df099216c10df4
parentkernel: put process name in quotes and print exit status and termination signal on crashed processes (diff)
downloadmds-f31e7364a4ca0c868e5f1f9273abb14c873e3299.tar.gz
mds-f31e7364a4ca0c868e5f1f9273abb14c873e3299.tar.bz2
mds-f31e7364a4ca0c868e5f1f9273abb14c873e3299.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/mds-echo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mds-echo.c b/src/mds-echo.c
index f2b1f82..aa3c8b7 100644
--- a/src/mds-echo.c
+++ b/src/mds-echo.c
@@ -289,7 +289,7 @@ int echo_message(void)
}
n = 1 + strlen("To: \nIn response to: \nMessage ID: \n\n");
- n += strlen(recv_client_id) + strlen(recv_message_id) + 10;
+ n += strlen(recv_client_id) + strlen(recv_message_id) + 3 * sizeof(int32_t);
if (recv_length != NULL)
n += strlen(recv_length) + 1;
@@ -310,7 +310,7 @@ int echo_message(void)
message_id = message_id == INT32_MAX ? 0 : (message_id + 1);
- if (full_send(echo_buffer, n - 1))
+ if (full_send(echo_buffer, strlen(echo_buffer)))
return 1;
return full_send(received.payload, received.payload_size);
}