only parse messages from channel_ready when its a session calling channel ready on itself not when another thread calls it

This commit is contained in:
Anthony Minessale 2011-07-05 15:29:13 -05:00
parent 81b56a2490
commit 1d12519d0b

View File

@ -1723,7 +1723,7 @@ SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_
}
if (ret) {
if (!switch_channel_test_flag(channel, CF_LEG_HOLDING)) {
if (!switch_channel_test_flag(channel, CF_LEG_HOLDING) && switch_core_session_in_thread(channel->session)) {
switch_ivr_parse_all_events(channel->session);
}
}