]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweaks
authorAndrey Volk <andywolk@gmail.com>
Sat, 12 Jul 2025 16:21:58 +0000 (16:21 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 12 Jul 2025 22:34:47 +0000 (01:34 +0300)
src/mod/applications/mod_http_cache/mod_http_cache.c
src/mod/formats/mod_imagick/mod_imagick.c
src/switch_curl.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);
                }
index 5c185a5e44d7ad96e1c63bc31faba27c2230d05f..b599b68fd901c0adc09ee457bccc2535f035e65e 100644 (file)
@@ -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)
index 0a8cb682c3073c41270e9b026687d80bc8bc67c0..c0cec21e5640bdda9dd65b8fed0847ca394ea742 100644 (file)
@@ -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)