assert(st->curl != NULL);
st->apache_buffer_fill = 0;
+
+ curl_easy_setopt(st->curl, CURLOPT_URL, st->url);
+
if (curl_easy_perform(st->curl) != CURLE_OK) {
ERROR("apache: curl_easy_perform failed: %s", st->apache_curl_error);
- return (-1);
+ return -1;
}
/* fallback - server_type to apache if not set at this time */
}
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);
+ return -1;
}
status = ascent_xml(ascent_buffer);
}
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);
+ return -1;
}
status = bind_xml(bind_buffer);
status = curl_easy_perform(db->curl);
if (status != CURLE_OK) {
ERROR("curl_json plugin: curl_easy_perform failed with status %i: %s (%s)",
- status, db->curl_errbuf, url);
+ status, db->curl_errbuf, db->url);
- return (-1);
+ return -1;
}
if (db->stats != NULL)
curl_stats_dispatch(db->stats, db->curl, cj_host(db), "curl_json",
status = curl_easy_perform(curl);
if (status != CURLE_OK) {
ERROR("curl_xml plugin: curl_easy_perform failed with status %i: %s (%s)",
- status, db->curl_errbuf, url);
+ status, db->curl_errbuf, db->url);
- return (-1);
+ return -1;
}
if (db->stats != NULL)
curl_stats_dispatch(db->stats, db->curl, cx_host(db), "curl_xml",
int fields_num;
if (curl == NULL)
- return (-1);
+ return -1;
if (url == NULL)
- return (-1);
+ return -1;
nginx_buffer_len = 0;
+
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+
if (curl_easy_perform(curl) != CURLE_OK) {
WARNING("nginx plugin: curl_easy_perform failed: %s", nginx_curl_error);
- return (-1);
+ return -1;
}
ptr = nginx_buffer;