curl_easy_setopt (cb->curl, CURLOPT_POSTFIELDS, cb->send_buffer);
status = curl_easy_perform (cb->curl);
- if (status != 0)
+ if (status != CURLE_OK)
{
ERROR ("write_http plugin: curl_easy_perform failed with "
"status %i: %s",
return (-1);
}
- curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1);
- curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION);
+ curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1L);
+ curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, COLLECTD_USERAGENT);
headers = NULL;
headers = curl_slist_append (headers, "Accept: */*");
curl_easy_setopt (cb->curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
}
- curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYPEER, cb->verify_peer);
+ curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYPEER, (long) cb->verify_peer);
curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYHOST,
- cb->verify_host ? 2 : 0);
+ cb->verify_host ? 2L : 0L);
if (cb->cacert != NULL)
curl_easy_setopt (cb->curl, CURLOPT_CAINFO, cb->cacert);