summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-18 21:12:19 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-18 21:12:19 +0800
commitab08c615c706cb95fe95ad83c108856a03be2384 (patch)
tree84f5e8911ce0b6465879182a34d87ee59f4bb1ca
parent19f152a4a9b8af87104360644ac111410752bb8f (diff)
Prepend the new ticket content
-rw-r--r--ticket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ticket.c b/ticket.c
index 06a1fb3..cd1cd7f 100644
--- a/ticket.c
+++ b/ticket.c
@@ -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, ""))