]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
move session-rest
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 17 Feb 2007 17:30:49 +0000 (17:30 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 17 Feb 2007 17:30:49 +0000 (17:30 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4310 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index a695c832215336d948f71697840a70883fe0a573..ceddeaf09192c069d07b9180595895977dcba425 100644 (file)
@@ -2087,7 +2087,6 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
 
        switch_channel_set_variable(chan_a, SWITCH_BRIDGE_VARIABLE, NULL);
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BRIDGE THREAD DONE [%s]\n", switch_channel_get_name(chan_a));
-       switch_core_session_reset(session_a);
 
        switch_channel_clear_flag(chan_a, CF_BRIDGED);
        switch_mutex_lock(data->mutex);
@@ -3534,6 +3533,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
                        switch_channel_set_private(peer_channel, "_bridge_", other_audio_thread);
                        switch_channel_set_state(peer_channel, CS_LOOPBACK);
                        audio_bridge_thread(NULL, (void *) this_audio_thread);
+                       switch_core_session_reset(session);
 
                        if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_UNBRIDGE) == SWITCH_STATUS_SUCCESS) {
                                switch_channel_event_set_data(caller_channel, event);
@@ -3560,6 +3560,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
                                        switch_yield(1000);
                                }
                        }
+                       switch_core_session_reset(peer_session);
                        switch_core_session_rwunlock(peer_session);
                        
                } else {