X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcurl_json.c;h=510d9b621d0b9a32b235337856f455c82eef2b3e;hb=01ec4734ca5434d93f428809a796da0d01ff5088;hp=80632424785ae697b8a809588cac5f1b2e61ba15;hpb=06efe4f50bbdfbade922b8a3ee4576eb2cc4562c;p=collectd.git diff --git a/src/curl_json.c b/src/curl_json.c index 80632424..510d9b62 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -654,11 +654,9 @@ static int cj_init_curl (cj_t *db) /* {{{ */ if (db->timeout >= 0) 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_TIMEOUT_MS, (long) CDTIME_T_TO_MS(db->timeout)); else - curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, - CDTIME_T_TO_MS(plugin_get_interval())); + curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) CDTIME_T_TO_MS(plugin_get_interval())); #endif return (0);