From 72cedecbbfa6b17b444edf5943dce2ecc307a340 Mon Sep 17 00:00:00 2001 From: nirav Date: Sun, 17 Mar 2019 10:16:18 +0530 Subject: Fix log_msg --- src/http.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/http.c') diff --git a/src/http.c b/src/http.c index ec1ecc5..96a723d 100644 --- a/src/http.c +++ b/src/http.c @@ -32,7 +32,7 @@ static size_t write_response(void *ptr, size_t size, size_t nmemb, void *stream) struct write_result *result = (struct write_result *)stream; if (result->pos + size * nmemb >= BUFFER_SIZE - 1) { - log_msg(LOG_ERROR, "write_response", "buffer too small"); + log_msg(LOG_WARNING, "write_response", "buffer too small"); return 0; } @@ -77,7 +77,7 @@ char *get_request(const char *url) status = curl_easy_perform(curl); if (status != 0) { - log_msg(LOG_ERROR, "get_request", + log_msg(LOG_WARNING, "get_request", "unable to request data from %s: %s", url, curl_easy_strerror(status)); goto error; @@ -85,7 +85,7 @@ char *get_request(const char *url) curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code); if (code != 200) { - log_msg(LOG_ERROR, "get_request", "server responded with code %ld", + log_msg(LOG_WARNING, "get_request", "server responded with code %ld", code); goto error; } @@ -146,14 +146,14 @@ char *post_request(const char *url, char *post_data) status = curl_easy_perform(curl); if (status != 0) { - log_msg(LOG_ERROR, "post_request", "unable to request data from %s: %s", + log_msg(LOG_WARNING, "post_request", "unable to request data from %s: %s", url, curl_easy_strerror(status)); goto error; } curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code); if (code != 200) { - log_msg(LOG_ERROR, "post_request", "server responded with code %ld", code); + log_msg(LOG_WARNING, "post_request", "server responded with code %ld", code); goto error; } -- cgit v1.2.3