X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fascent.c;h=2ba3c772d5f9f8116f4100b6f3484756cfbb8ef7;hb=6fa9a91c383a96f5e857239946590b8ff1ffe519;hp=66640d999e6645bf5aaf8a38f6df8a93331e6a1f;hpb=4b0440039f4f3cf47346de666ac775dfb3c74e9b;p=collectd.git diff --git a/src/ascent.c b/src/ascent.c index 66640d99..2ba3c772 100644 --- a/src/ascent.c +++ b/src/ascent.c @@ -590,11 +590,12 @@ static int ascent_init (void) /* {{{ */ if (cacert != NULL) curl_easy_setopt (curl, CURLOPT_CAINFO, cacert); +#ifdef HAVE_CURLOPT_TIMEOUT_MS 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_TIMEOUT_MS, (long) CDTIME_T_TO_MS(plugin_get_interval())); +#endif return (0); } /* }}} int ascent_init */