X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fascent.c;h=74cef333ee1174ee2209edd4885b23280a0b6966;hp=840fe8b8477b7f7581a7568664e348b38383ce11;hb=f374b72032a227a75b6bc9ae574cd28abbc16f24;hpb=02a29964b4e67bb04c1419daedc8eacfafdf0a7c 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);