summaryrefslogtreecommitdiff
path: root/ticket.c
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-01 14:45:00 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-01 14:45:00 +0800
commit7dcc8142197639a0cbffd75a6ef92a1c9764f1a7 (patch)
treef36f40226421831a05813dae6a358c2b4838aa71 /ticket.c
parent494a46196ade016b606716b36045f6b08a3234bc (diff)
Remove logging on safe parses
Diffstat (limited to 'ticket.c')
-rw-r--r--ticket.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/ticket.c b/ticket.c
index 05c6b54..0f39f2f 100644
--- a/ticket.c
+++ b/ticket.c
@@ -85,21 +85,12 @@ static size_t history_handler(void *contents, size_t size, size_t nmemb
if (!strcmp(token, "id")) {
token = strtok_r(NULL, ":", &tokensaveptr);
ticket_history->id = atoi(++token);
-#ifdef DEBUG
- printf("ID: %u\n", ticket_history->id);
-#endif
} else if (!strcmp(token, "Ticket")) {
token = strtok_r(NULL, ":", &tokensaveptr);
ticket_history->ticket = atoi(++token);
-#ifdef DEBUG
- printf("Ticket: %u\n", ticket_history->ticket);
-#endif
} else if (!strcmp(token, "TimeTaken")) {
token = strtok_r(NULL, ":", &tokensaveptr);
ticket_history->time_taken = atoi(++token);
-#ifdef DEBUG
- printf("Time Taken: %u\n", ticket_history->time_taken);
-#endif
} else if (!strcmp(token, "Type")) {
token = strtok_r(NULL, ":", &tokensaveptr);
if (!strcmp(++token, "Create"))
@@ -120,9 +111,6 @@ static size_t history_handler(void *contents, size_t size, size_t nmemb
else
ticket_history->type
= RTCLIENT_TICKET_HISTORY_TYPE_UNKNOWN;
-#ifdef DEBUG
- printf("Type: %u\n", ticket_history->type);
-#endif
} else if (!strcmp(token, "Field")) {
token = strtok_r(NULL, ":", &tokensaveptr);
if (!strcmp(++token, "Priority"))
@@ -137,9 +125,6 @@ static size_t history_handler(void *contents, size_t size, size_t nmemb
else
ticket_history->field
= RTCLIENT_TICKET_HISTORY_FIELD_NONE;
-#ifdef DEBUG
- printf("Field: %u\n", ticket_history->field);
-#endif
} else if (!strcmp(token, "OldValue")) {
token = strtok_r(NULL, ":", &tokensaveptr);
if (token && strcmp(token, "")) {
@@ -147,9 +132,6 @@ static size_t history_handler(void *contents, size_t size, size_t nmemb
= malloc(strlen(token));
strcpy(ticket_history->old_value
, ++token);
-#ifdef DEBUG
- printf("Old Value: %s\n", ticket_history->old_value);
-#endif
}
} else if (!strcmp(token, "NewValue")) {
token = strtok_r(NULL, ":", &tokensaveptr);
@@ -158,27 +140,18 @@ static size_t history_handler(void *contents, size_t size, size_t nmemb
= malloc(strlen(token));
strcpy(ticket_history->new_value
, ++token);
-#ifdef DEBUG
- printf("New Value: %s\n", ticket_history->new_value);
-#endif
}
} else if (!strcmp(token, "Data")) {
token = strtok_r(NULL, ":", &tokensaveptr);
ticket_history->data
= malloc(strlen(token));
strcpy(ticket_history->data, ++token);
-#ifdef DEBUG
- printf("Data: %s\n", ticket_history->data);
-#endif
} else if (!strcmp(token, "Description")) {
token = strtok_r(NULL, ":", &tokensaveptr);
ticket_history->description
= malloc(strlen(token));
strcpy(ticket_history->description
, ++token);
-#ifdef DEBUG
- printf("Description: %s\n", ticket_history->description);
-#endif
} else if (!strcmp(token, "Content")) {
token = strtok_r(NULL, ":", &tokensaveptr);
ticket_history->content
@@ -192,13 +165,10 @@ static size_t history_handler(void *contents, size_t size, size_t nmemb
ticket_history->creator
= malloc(strlen(token));
strcpy(ticket_history->creator, ++token);
-#ifdef DEBUG
- printf("Creator: %s\n", ticket_history->creator);
-#endif
} else if (!strcmp(token, "Created")) {
token = strtok_r(NULL, ":", &tokensaveptr);
#ifdef DEBUG
- printf("Created Token: %s\n", token);
+ printf("Created: %s\n", token);
#endif
/*
ticket_history->created