use wait_for_state with NULL instead of same channel twice

This commit is contained in:
Anthony Minessale
2010-07-21 19:31:49 -05:00
parent ed7ccc1432
commit d3108020c5
2 changed files with 2 additions and 3 deletions
@@ -804,11 +804,10 @@ static switch_status_t loopback_bowout_on_execute_state_handler(switch_core_sess
switch_channel_caller_extension_masquerade(channel, other_channel, 0);
switch_channel_set_state(other_channel, CS_RESET);
switch_channel_wait_for_state(other_channel, other_channel, CS_RESET);
switch_channel_wait_for_state(other_channel, NULL, CS_RESET);
switch_channel_set_variable(channel, "process_cdr", "false");
switch_channel_set_variable(b_channel, "process_cdr", "false");
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
switch_channel_hangup(b_channel, SWITCH_CAUSE_NORMAL_CLEARING);
switch_channel_set_state(other_channel, CS_EXECUTE);
switch_core_session_rwunlock(other_session);
}