From: Anthony Minessale Date: Thu, 22 Dec 2016 19:03:54 +0000 (-0600) Subject: FS-9880: [freeswitch-core] Code to check for text-only is too soon in app processing... X-Git-Tag: v1.8.0~970 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf506d2f022eb2e4be6b0b2c2b6ebbe98e27b201;p=thirdparty%2Ffreeswitch.git FS-9880: [freeswitch-core] Code to check for text-only is too soon in app processing #resolve --- diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 4dd2e2a6c0..2ffcc7d37e 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -2677,15 +2677,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application_get_flag *flags = application_interface->flags; } - if (switch_channel_text_only(session->channel) && - !switch_test_flag(application_interface, SAF_SUPPORT_NOMEDIA) && - !switch_test_flag(application_interface, SAF_SUPPORT_TEXT_ONLY)) { - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Application %s does not support text-only mode on channel %s!\n", - app, switch_channel_get_name(session->channel)); - switch_channel_hangup(session->channel, SWITCH_CAUSE_SERVICE_NOT_IMPLEMENTED); - switch_goto_status(SWITCH_STATUS_FALSE, done); - } - if (!switch_test_flag(application_interface, SAF_SUPPORT_NOMEDIA) && (switch_channel_test_flag(session->channel, CF_VIDEO))) { switch_core_session_request_video_refresh(session); } @@ -2719,6 +2710,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application_get_flag } } + if (switch_channel_text_only(session->channel) && + !switch_test_flag(application_interface, SAF_SUPPORT_NOMEDIA) && + !switch_test_flag(application_interface, SAF_SUPPORT_TEXT_ONLY)) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Application %s does not support text-only mode on channel %s!\n", + app, switch_channel_get_name(session->channel)); + switch_channel_hangup(session->channel, SWITCH_CAUSE_SERVICE_NOT_IMPLEMENTED); + switch_goto_status(SWITCH_STATUS_FALSE, done); + } + exec: switch_core_session_exec(session, application_interface, arg);