X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=824d044719d3f71c42f5b899ef68f063ab7d188b;hb=7778f852d4c40066c4c5c096d17ff890a656ad31;hp=b7308ad83ae7707a9b992aa0a168f1b9ae850593;hpb=1035fba8812893e50d00a871e3399cc1ece3b384;p=collectd.git diff --git a/src/bind.c b/src/bind.c index b7308ad8..824d0447 100644 --- a/src/bind.c +++ b/src/bind.c @@ -1598,7 +1598,6 @@ static int bind_init(void) /* {{{ */ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, bind_curl_callback); curl_easy_setopt(curl, CURLOPT_USERAGENT, COLLECTD_USERAGENT); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, bind_curl_error); - curl_easy_setopt(curl, CURLOPT_URL, (url != NULL) ? url : BIND_DEFAULT_URL); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 50L); #ifdef HAVE_CURLOPT_TIMEOUT_MS @@ -1620,6 +1619,9 @@ static int bind_read(void) /* {{{ */ } bind_buffer_fill = 0; + + curl_easy_setopt(curl, CURLOPT_URL, (url != NULL) ? url : BIND_DEFAULT_URL); + if (curl_easy_perform(curl) != CURLE_OK) { ERROR("bind plugin: curl_easy_perform failed: %s", bind_curl_error); return -1;