diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-18 21:12:19 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-18 21:12:19 +0800 |
commit | ab08c615c706cb95fe95ad83c108856a03be2384 (patch) | |
tree | 84f5e8911ce0b6465879182a34d87ee59f4bb1ca | |
parent | 19f152a4a9b8af87104360644ac111410752bb8f (diff) |
Prepend the new ticket content
-rw-r--r-- | ticket.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -19,7 +19,7 @@ void rtclient_ticket_new(const char *queue , const char *due , const char *text) { - size_t length = 0; + size_t length = strlen("id: ticket/new\n"); if (queue && strcmp(queue, "")) length += strlen("Queue: \n") + strlen(queue); if (requestor && strcmp(requestor, "")) @@ -50,7 +50,7 @@ void rtclient_ticket_new(const char *queue length += strlen("Text: \n") + strlen(text); char content[length + 1]; - memset(content, 0, strlen(content)); + strcpy(content, "id: ticket/new\n"); if (queue && strcmp(queue, "")) sprintf(content, "%sQueue: %s\n", content, queue); if (requestor && strcmp(requestor, "")) |