X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fascent.c;h=74cef333ee1174ee2209edd4885b23280a0b6966;hb=96b920e6b7bf70560eb95c911202afbeaab2b965;hp=840fe8b8477b7f7581a7568664e348b38383ce11;hpb=ffaf9b893b6042a76e1c0dadd83ce06904fcc89a;p=collectd.git diff --git a/src/ascent.c b/src/ascent.c index 840fe8b8..74cef333 100644 --- a/src/ascent.c +++ b/src/ascent.c @@ -511,7 +511,6 @@ static int ascent_init(void) /* {{{ */ #endif } - curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 50L); @@ -554,6 +553,9 @@ static int ascent_read(void) /* {{{ */ } ascent_buffer_fill = 0; + + curl_easy_setopt(curl, CURLOPT_URL, url); + if (curl_easy_perform(curl) != CURLE_OK) { ERROR("ascent plugin: curl_easy_perform failed: %s", ascent_curl_error); return (-1);