X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcurl.c;h=32ba74527405a8393767a1901093fd571db01c3c;hp=69a5b9561c12c0e0f58a9e0e9b16716f84e7f777;hb=d6021a800b12c89b5a78877af2c5b9abc1a8e609;hpb=e33a2a5fffa6e57f8cea775ce2201606d49e155f diff --git a/src/curl.c b/src/curl.c index 69a5b956..32ba7452 100644 --- a/src/curl.c +++ b/src/curl.c @@ -378,6 +378,7 @@ static int cc_page_init_curl (web_page_t *wp) /* {{{ */ curl_easy_setopt (wp->curl, CURLOPT_ERRORBUFFER, wp->curl_errbuf); curl_easy_setopt (wp->curl, CURLOPT_URL, wp->url); curl_easy_setopt (wp->curl, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt (wp->curl, CURLOPT_MAXREDIRS, 50L); if (wp->user != NULL) { @@ -615,7 +616,7 @@ static int cc_read_page (web_page_t *wp) /* {{{ */ wp->buffer_fill = 0; status = curl_easy_perform (wp->curl); - if (status != 0) + if (status != CURLE_OK) { ERROR ("curl plugin: curl_easy_perform failed with staus %i: %s", status, wp->curl_errbuf);