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, 1L);
curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION);
headers = NULL;
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);
}
command_len = (size_t) ssnprintf (command, sizeof (command),
- "PUTVAL %s interval=%i %s\r\n",
- key, vl->interval, values);
+ "PUTVAL %s interval=%.3f %s\r\n",
+ key,
+ CDTIME_T_TO_DOUBLE (vl->interval),
+ values);
if (command_len >= sizeof (command)) {
ERROR ("write_http plugin: Command buffer too small: "
"Need %zu bytes.", command_len + 1);