From: Andrey Volk Date: Sat, 12 Jul 2025 16:21:58 +0000 (+0000) Subject: tweaks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79eb2abe14bbb1daa2ab33a97c0f7864f51185e3;p=thirdparty%2Ffreeswitch.git tweaks --- diff --git a/src/mod/applications/mod_http_cache/mod_http_cache.c b/src/mod/applications/mod_http_cache/mod_http_cache.c index 365ba27425..ba28be5cae 100644 --- a/src/mod/applications/mod_http_cache/mod_http_cache.c +++ b/src/mod/applications/mod_http_cache/mod_http_cache.c @@ -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); } diff --git a/src/mod/formats/mod_imagick/mod_imagick.c b/src/mod/formats/mod_imagick/mod_imagick.c index 5c185a5e44..b599b68fd9 100644 --- a/src/mod/formats/mod_imagick/mod_imagick.c +++ b/src/mod/formats/mod_imagick/mod_imagick.c @@ -488,9 +488,15 @@ static void myErrorHandler(const ExceptionType t, const char *reason, const char switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s: %s\n", reason, description); } -static void myFatalErrorHandler(const ExceptionType t, const char *reason, const char *description) +static +#if defined(_MSC_VER) && defined(_WIN32) +#else + __attribute__((noreturn)) +#endif +void myFatalErrorHandler(const ExceptionType t, const char *reason, const char *description) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "%s: %s\n", reason, description); + abort(); } static void myWarningHandler(const ExceptionType t, const char *reason, const char *description) diff --git a/src/switch_curl.c b/src/switch_curl.c index 0a8cb682c3..c0cec21e56 100644 --- a/src/switch_curl.c +++ b/src/switch_curl.c @@ -45,7 +45,7 @@ SWITCH_DECLARE(void) switch_curl_slist_free_all(switch_curl_slist_t * list) SWITCH_DECLARE(const char *) switch_curl_easy_strerror(switch_CURLcode errornum ) { - return curl_easy_strerror(errornum); + return curl_easy_strerror((CURLcode)errornum); } SWITCH_DECLARE(void) switch_curl_init(void)