From: Florian Forster Date: Sat, 16 Mar 2013 12:40:14 +0000 (+0100) Subject: Merge branch 'collectd-4.10' into collectd-5.1 X-Git-Tag: collectd-5.1.3~10 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d6021a800b12c89b5a78877af2c5b9abc1a8e609;p=collectd.git Merge branch 'collectd-4.10' into collectd-5.1 Conflicts: src/curl_json.c --- d6021a800b12c89b5a78877af2c5b9abc1a8e609 diff --cc src/curl_json.c index 2ddaff35,24e1df1e..19efc5d6 --- a/src/curl_json.c +++ b/src/curl_json.c @@@ -766,14 -817,11 +759,14 @@@ static int cj_curl_perform (cj_t *db, C return (-1); } + url = NULL; + curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url); + status = curl_easy_perform (curl); - if (status != 0) + if (status != CURLE_OK) { ERROR ("curl_json plugin: curl_easy_perform failed with status %i: %s (%s)", - status, db->curl_errbuf, url); + status, db->curl_errbuf, (url != NULL) ? url : ""); yajl_free (db->yajl); db->yajl = yprev; return (-1);