diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-14 17:29:25 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-14 17:29:25 +0800 |
commit | 74ccf9e85a81f2347730103108cc0b9d773e5f3c (patch) | |
tree | a5604bbe23c12d92daf2ea64931d919fc6ddcfae /anteraja.c | |
parent | 61cc88a1319860bc63ed4e228aa1afa69722f32b (diff) |
Log that works
Log will show up with libcurl's before the HTML,
and only log that is within libcurl's, i.e. in the WRITEFUNCTION.
Diffstat (limited to 'anteraja.c')
-rw-r--r-- | anteraja.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -33,9 +33,6 @@ void anteraja_services(const char *origin, const char *destination, double weigh *post = malloc(strlen(POST) + strlen(origin) + strlen(destination) + strlen("50000") - 2 * strlen("%s") - strlen("%d") + 1); sprintf(*post, POST, origin, destination, (int)weight * 1000); -#ifdef DEBUG - printf("POST: %s\n", *post); -#endif curl_easy_setopt(curl, CURLOPT_POSTFIELDS, *post); } @@ -45,7 +42,7 @@ size_t anteraja_services_handle(const char *contents, size_t size, size_t nmemb, size_t realsize = size * nmemb; #ifdef DEBUG ((char *)contents)[realsize] = '\0'; - printf("%s\n", contents); + fprintf(stderr, "%s\n", contents); #endif handle_services(contents, realsize, status_trail, (const char *[]){ "content", |