From bdbf0844d8027289a48f12f6fd068413b7cc4884 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 24 Aug 2015 20:13:05 +0200 Subject: introduce the `Origin command`-header 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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mds-echo.c') diff --git a/src/mds-echo.c b/src/mds-echo.c index fa2ed53..4201a5e 100644 --- a/src/mds-echo.c +++ b/src/mds-echo.c @@ -310,7 +310,7 @@ int echo_message(void) /* Construct echo message headers. */ - n = sizeof("To: \nIn response to: \nMessage ID: \n\n") / sizeof(char); + n = sizeof("To: \nIn response to: \nMessage ID: \nOrigin command: echo\n\n") / sizeof(char); n += strlen(recv_client_id) + strlen(recv_message_id) + 3 * sizeof(uint32_t); if (recv_length != NULL) n += strlen(recv_length) + 1; @@ -318,7 +318,13 @@ int echo_message(void) if ((echo_buffer_size < n) || (echo_buffer_size * 4 > n)) fail_if (xxrealloc(old_buffer, echo_buffer, echo_buffer_size = n, char)); - sprintf(echo_buffer, "To: %s\nIn response to: %s\nMessage ID: %" PRIu32 "\n%s%s\n", + sprintf(echo_buffer, + "To: %s\n" + "In response to: %s\n" + "Message ID: %" PRIu32 "\n" + "Origin command: echo\n" + "%s%s" + "\n", recv_client_id, recv_message_id, message_id, recv_length == NULL ? "" : recv_length, recv_length == NULL ? "" : "\n"); -- cgit v1.2.3-70-g09d2