summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-04 15:12:07 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-04 15:12:07 +0800
commit2ec07c04b8a4ea88cc1a2091130dd3404d950d0d (patch)
tree5363e0e61435368eee94c6d3d8aafeef9fda242b
parent134ca7ec223e1d24b23ae6a8894d844baaf15c2b (diff)
Unset WRITEFUNCTION
With the default WRITEFUNCTION, verbose libcurl already gives the response.
-rw-r--r--rtclient.c13
1 files changed, 0 insertions, 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 =