diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-24 20:13:05 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-24 20:13:07 +0200 |
commit | bdbf0844d8027289a48f12f6fd068413b7cc4884 (patch) | |
tree | 9aa61cd02796bd3e8bc01850d5f803a9d7bea2d0 /src/mds-echo.c | |
parent | mds-kkbd: decipher mapping_query and fix a minor bug in it (diff) | |
download | mds-bdbf0844d8027289a48f12f6fd068413b7cc4884.tar.gz mds-bdbf0844d8027289a48f12f6fd068413b7cc4884.tar.bz2 mds-bdbf0844d8027289a48f12f6fd068413b7cc4884.tar.xz |
introduce the `Origin command`-header
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-echo.c | 10 |
1 files changed, 8 insertions, 2 deletions
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"); |