X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcurl_xml.c;h=8d505610dbbf003308419967ed1b884797bd2de4;hb=617ab1acea89e0d0be874c6fbaa626ea5ae87c50;hp=5adaf067a157e44220655adb79855c6fee0d3b26;hpb=e9cc06595b478d522773be7cd03423f84f8d43b6;p=collectd.git diff --git a/src/curl_xml.c b/src/curl_xml.c index 5adaf067..8d505610 100644 --- a/src/curl_xml.c +++ b/src/curl_xml.c @@ -608,6 +608,7 @@ static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */ long rc; char *ptr; char *url; + url = db->url; db->buffer_fill = 0; status = curl_easy_perform (curl); @@ -837,8 +838,7 @@ static int cx_init_curl (cx_t *db) /* {{{ */ curl_easy_setopt (db->curl, CURLOPT_NOSIGNAL, 1L); curl_easy_setopt (db->curl, CURLOPT_WRITEFUNCTION, cx_curl_callback); curl_easy_setopt (db->curl, CURLOPT_WRITEDATA, db); - curl_easy_setopt (db->curl, CURLOPT_USERAGENT, - PACKAGE_NAME"/"PACKAGE_VERSION); + curl_easy_setopt (db->curl, CURLOPT_USERAGENT, COLLECTD_USERAGENT); curl_easy_setopt (db->curl, CURLOPT_ERRORBUFFER, db->curl_errbuf); curl_easy_setopt (db->curl, CURLOPT_URL, db->url);