X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcurl_json.c;h=510d9b621d0b9a32b235337856f455c82eef2b3e;hb=7bab45b57d6ef99ae55c499c51478dd63c3b1397;hp=80632424785ae697b8a809588cac5f1b2e61ba15;hpb=a761816a12f3238246d301719888bbb63b6b1e7c;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);