X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnginx.c;h=4e4ce3bbc6115572873668a76507f80ccd82b316;hb=fe3ed442ad6f9dfc583c91ab97f912f9ca44aee3;hp=edb55b9e986e5af91eed8d0dcbc1e31499c8f106;hpb=293ef78a6140221ccf524d4e52a0f475f027815a;p=collectd.git diff --git a/src/nginx.c b/src/nginx.c index edb55b9e..4e4ce3bb 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -181,15 +181,17 @@ static int init (void) 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())); } +#endif return (0); } /* void init */