mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
tweaks
This commit is contained in:
@@ -1131,10 +1131,10 @@ static switch_status_t http_get(url_cache_t *cache, http_profile_t *profile, cac
|
|||||||
#else
|
#else
|
||||||
if ((get_data.fd = open(get_data.url->filename, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR)) > -1) {
|
if ((get_data.fd = open(get_data.url->filename, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR)) > -1) {
|
||||||
#endif
|
#endif
|
||||||
switch_curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1);
|
switch_curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, (long)1);
|
||||||
switch_curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, 10);
|
switch_curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, (long)10);
|
||||||
switch_curl_easy_setopt(curl_handle, CURLOPT_FAILONERROR, 1);
|
switch_curl_easy_setopt(curl_handle, CURLOPT_FAILONERROR, (long)1);
|
||||||
switch_curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
|
switch_curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, (long)1);
|
||||||
if (headers) {
|
if (headers) {
|
||||||
switch_curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, headers);
|
switch_curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, headers);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
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);
|
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)
|
static void myWarningHandler(const ExceptionType t, const char *reason, const char *description)
|
||||||
|
|||||||
+1
-1
@@ -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 )
|
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)
|
SWITCH_DECLARE(void) switch_curl_init(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user