make sure CURLOPT_TIMEOUT_MS only gets longs
[collectd.git] / src / ascent.c
index 66640d9..501f294 100644 (file)
@@ -591,7 +591,7 @@ static int ascent_init (void) /* {{{ */
     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()));