X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fascent.c;h=40b153690e8ed41a15645e017d17214c74024e11;hb=9655d4a6d9fa2c4f02032759b831e93933d68bd9;hp=16f9104618207c85313f3e4f128e622fd4875c54;hpb=307c875e5a78a2729fbbe1a588d232e9a129d75a;p=collectd.git diff --git a/src/ascent.c b/src/ascent.c index 16f91046..40b15369 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;