From: Florian Forster Date: Sun, 26 May 2013 15:28:13 +0000 (+0200) Subject: curl plugin: Don't abort when reading the response code failed. X-Git-Tag: collectd-5.4.0~31^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ff6bda50a3efad2f32974bcbb1eb00c2303b2ee6;p=collectd.git curl plugin: Don't abort when reading the response code failed. --- diff --git a/src/curl.c b/src/curl.c index f580cf24..f927f810 100644 --- a/src/curl.c +++ b/src/curl.c @@ -647,11 +647,11 @@ static int cc_read_page (web_page_t *wp) /* {{{ */ long response_code = 0; status = curl_easy_getinfo(wp->curl, CURLINFO_RESPONSE_CODE, &response_code); if(status != CURLE_OK) { - ERROR ("curl plugin: curl_easy_getinfo failed with staus %i: %s", + ERROR ("curl plugin: Fetching response code failed with staus %i: %s", status, wp->curl_errbuf); - return (-1); // TODO: do we need to return in here? this is nonfatal error + } else { + cc_submit_response_code(wp, response_code); } - cc_submit_response_code(wp, response_code); } if (wp->response_time)