]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_http_cache] Fix error: curl_easy_setopt expects a long argument [-Werror=attribu... 2857/head
authorAndrey Volk <andywolk@gmail.com>
Tue, 15 Jul 2025 10:31:28 +0000 (13:31 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 15 Jul 2025 10:31:28 +0000 (13:31 +0300)
src/mod/applications/mod_http_cache/mod_http_cache.c

index 365ba27425ee9f9d71b612ef172fb300de26e544..ba28be5cae71a6ef99821003c9760f407f54a45f 100644 (file)
@@ -1131,10 +1131,10 @@ static switch_status_t http_get(url_cache_t *cache, http_profile_t *profile, cac
 #else
        if ((get_data.fd = open(get_data.url->filename, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR)) > -1) {
 #endif
-               switch_curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1);
-               switch_curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, 10);
-               switch_curl_easy_setopt(curl_handle, CURLOPT_FAILONERROR, 1);
-               switch_curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
+               switch_curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, (long)1);
+               switch_curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, (long)10);
+               switch_curl_easy_setopt(curl_handle, CURLOPT_FAILONERROR, (long)1);
+               switch_curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, (long)1);
                if (headers) {
                        switch_curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, headers);
                }