X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_http.c;h=7f5943a2435f1f7c9dafa9221433dd2ef92f4e41;hb=d6021a800b12c89b5a78877af2c5b9abc1a8e609;hp=3035e43a99611ec3daf9e3b5b99f2ec3a2d71316;hpb=488c2ca9e3f6f6082f192bdd5d737c6cd1298ba2;p=collectd.git diff --git a/src/write_http.c b/src/write_http.c index 3035e43a..7f5943a2 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -88,7 +88,7 @@ static int wh_send_buffer (wh_callback_t *cb) /* {{{ */ 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", @@ -111,7 +111,7 @@ static int wh_callback_init (wh_callback_t *cb) /* {{{ */ return (-1); } - curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1L); curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION); headers = NULL; @@ -147,9 +147,9 @@ static int wh_callback_init (wh_callback_t *cb) /* {{{ */ 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);