... to avoid portability problems.
curl_easy_setopt (st->curl, CURLOPT_CAINFO, st->cacert);
if (st->timeout >= 0)
- curl_easy_setopt (st->curl, CURLOPT_TIMEOUT_MS, st->timeout);
+ curl_easy_setopt (st->curl, CURLOPT_TIMEOUT_MS, (long) st->timeout);
else
curl_easy_setopt (st->curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(plugin_get_interval()));
curl_easy_setopt (curl, CURLOPT_CAINFO, cacert);
if (timeout != NULL)
- curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atoi(timeout));
+ curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atol(timeout));
else
curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(plugin_get_interval()));
curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt (curl, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, (timeout >= 0) ?
- timeout : CDTIME_T_TO_MS(plugin_get_interval()));
+ (long) timeout : CDTIME_T_TO_MS(plugin_get_interval()));
return (0);
curl_easy_setopt (wp->curl, CURLOPT_POSTFIELDS, wp->post_body);
if (wp->timeout >= 0)
- curl_easy_setopt (wp->curl, CURLOPT_TIMEOUT_MS, wp->timeout);
+ curl_easy_setopt (wp->curl, CURLOPT_TIMEOUT_MS, (long) wp->timeout);
else
curl_easy_setopt (wp->curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(plugin_get_interval()));
curl_easy_setopt (db->curl, CURLOPT_POSTFIELDS, db->post_body);
if (db->timeout >= 0)
- curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, db->timeout);
+ curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) db->timeout);
else if (db->interval > 0)
curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(db->timeout));
curl_easy_setopt (db->curl, CURLOPT_POSTFIELDS, db->post_body);
if (db->timeout >= 0)
- curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, db->timeout);
+ curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) db->timeout);
else
curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(plugin_get_interval()));
if (timeout != NULL)
{
- curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atoi(timeout));
+ curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atol(timeout));
}
else
{