提交 e9ab5368 authored 作者: Anthony Minessale's avatar Anthony Minessale

fix bug in mod_loopback where bowout=false

上级 7577b8aa
...@@ -52,7 +52,8 @@ typedef enum { ...@@ -52,7 +52,8 @@ typedef enum {
TFLAG_BRIDGE = (1 << 4), TFLAG_BRIDGE = (1 << 4),
TFLAG_BOWOUT = (1 << 5), TFLAG_BOWOUT = (1 << 5),
TFLAG_BLEG = (1 << 6), TFLAG_BLEG = (1 << 6),
TFLAG_APP = (1 << 7) TFLAG_APP = (1 << 7),
TFLAG_BOWOUT_USED = (1 << 8)
} TFLAGS; } TFLAGS;
struct private_object { struct private_object {
...@@ -635,7 +636,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc ...@@ -635,7 +636,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
tech_pvt = switch_core_session_get_private(session); tech_pvt = switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL); switch_assert(tech_pvt != NULL);
if (switch_test_flag(frame, SFF_CNG) || switch_test_flag(tech_pvt, TFLAG_CNG) || switch_test_flag(tech_pvt, TFLAG_BOWOUT)) { if (switch_test_flag(frame, SFF_CNG) || switch_test_flag(tech_pvt, TFLAG_CNG) || (switch_test_flag(tech_pvt, TFLAG_BOWOUT) && switch_test_flag(tech_pvt, TFLAG_BOWOUT_USED))) {
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
...@@ -662,6 +663,9 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc ...@@ -662,6 +663,9 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
switch_clear_flag_locked(tech_pvt, TFLAG_WRITE); switch_clear_flag_locked(tech_pvt, TFLAG_WRITE);
switch_clear_flag_locked(tech_pvt->other_tech_pvt, TFLAG_WRITE); switch_clear_flag_locked(tech_pvt->other_tech_pvt, TFLAG_WRITE);
switch_set_flag_locked(tech_pvt, TFLAG_BOWOUT_USED);
switch_set_flag_locked(tech_pvt->other_tech_pvt, TFLAG_BOWOUT_USED);
if (a_uuid && b_uuid) { if (a_uuid && b_uuid) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,
"%s detected bridge on both ends, attempting direct connection.\n", switch_channel_get_name(channel)); "%s detected bridge on both ends, attempting direct connection.\n", switch_channel_get_name(channel));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论