From f31e7364a4ca0c868e5f1f9273abb14c873e3299 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 9 Jun 2014 04:47:15 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-echo.c | 4 ++-- 1 file 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); } -- cgit v1.2.3-70-g09d2