]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use wait_for_state with NULL instead of same channel twice
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 22 Jul 2010 00:31:49 +0000 (19:31 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 22 Jul 2010 00:31:49 +0000 (19:31 -0500)
src/mod/endpoints/mod_loopback/mod_loopback.c
src/switch_ivr.c

index 0e52352b05d81de0165288f348ed7537a01e82e6..c87f2258edfdce55a5deadc5052daad9319f188c 100644 (file)
@@ -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);
                }
index c66c1d1821b2ec9dc9c568289fc6dcf1fdaef1a5..f19113dfbd6cc1a268fdc99e4990f6d023437be7 100644 (file)
@@ -1311,7 +1311,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_nomedia(const char *uuid, switch_medi
 
                        if (other_channel) {
                                if (!switch_core_session_in_thread(session)) {
-                                       switch_channel_wait_for_state(channel, channel, CS_PARK);
+                                       switch_channel_wait_for_state(channel, NULL, CS_PARK);
                                        switch_channel_wait_for_flag(channel, CF_REQ_MEDIA, SWITCH_FALSE, 10000, NULL);
                                        switch_channel_wait_for_flag(channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
                                        switch_channel_wait_for_flag(channel, CF_MEDIA_SET, SWITCH_TRUE, 10000, NULL);