From 2ec07c04b8a4ea88cc1a2091130dd3404d950d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Wed, 4 Sep 2019 15:12:07 +0800 Subject: Unset WRITEFUNCTION With the default WRITEFUNCTION, verbose libcurl already gives the response. --- rtclient.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/rtclient.c b/rtclient.c index cad4047..306aadc 100644 --- a/rtclient.c +++ b/rtclient.c @@ -31,18 +31,6 @@ bool rtclient_init(const char *url) return (bool)handle; } -static size_t handle_login(const char *response, size_t size, size_t nmemb, void *writedata) -{ -#ifdef DEBUG -#ifdef ANDROID - __android_log_print(ANDROID_LOG_DEBUG, "librtclient.so", "Login response:\n%s", response); -#else - fprintf(stderr, "Login response:\n%s\n", response); -#endif // ANDROID -#endif // DEBUG - return size * nmemb; -} - void rtclient_login(const char *name, const char *password) { struct curl_httppost *post, *last = NULL; @@ -57,7 +45,6 @@ void rtclient_login(const char *name, const char *password) last = NULL; curl_easy_setopt(handle, CURLOPT_URL, server_url); - curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, handle_login); curl_easy_setopt(handle, CURLOPT_HTTPPOST, post); #ifdef DEBUG CURLcode res = -- cgit v1.2.3