X-Git-Url: https://git.wpitchoune.net/gitweb/?p=prss.git;a=blobdiff_plain;f=src%2Fhttp.c;h=a9cf301726b5b7d7a4207280a893532182b0cd30;hp=55eab0fb6a54a534c61628dc5457d92a3f6a0621;hb=f44145caeb28320e1eb239fa04ff5da5ee89cafd;hpb=5a09ab51871a302a2d68533d7e086dfe86d9eb11 diff --git a/src/http.c b/src/http.c index 55eab0f..a9cf301 100644 --- a/src/http.c +++ b/src/http.c @@ -77,7 +77,7 @@ char *http_get(const char *url, const char *content) if (content) { curl_easy_setopt(curl, CURLOPT_POSTFIELDS, content); curl_easy_setopt(curl, - CURLOPT_POSTFIELDSIZE, + CURLOPT_POSTFIELDSIZE, (long)strlen(content)); } curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cbk_curl); @@ -104,14 +104,14 @@ json_object *http_json_get(const char *url, struct json_object *j) if (debug) printf("HTTP request= %s\n", json_object_to_json_string(j)); - + if (out) { result = json_tokener_parse(out); if (debug) printf("HTTP reply= %s\n", out); free(out); return result; - } + } return NULL; }