]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 26 Apr 2006 23:24:00 +0000 (23:24 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 26 Apr 2006 23:24:00 +0000 (23:24 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1273 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index eac7095ac082734e3cabcddd3434a54134ada745..98e8cb615c04e460b63535d5bf6881d85f8a6b4e 100644 (file)
@@ -794,10 +794,10 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
                        switch_channel_hangup(chan_b, SWITCH_CAUSE_NORMAL_CLEARING);
                }
                switch_channel_clear_flag(chan_a, CF_ORIGINATOR);
-       
+               his_thread->running = 0;
        }
 
-       his_thread->running = 0;        
+
        data->running = 0;
        return NULL;
 }
@@ -810,10 +810,11 @@ static switch_status audio_bridge_on_loopback(switch_core_session *session)
        channel = switch_core_session_get_channel(session);
        assert(channel != NULL);
 
-       arg = switch_channel_get_private(channel);      
-       audio_bridge_thread(NULL, (void *) arg);
-       switch_channel_set_private(channel, NULL);      
-       switch_channel_clear_state_handler(channel, &audio_bridge_peer_state_handlers);
+       if ((arg = switch_channel_get_private(channel))) {
+               switch_channel_set_private(channel, NULL);
+               audio_bridge_thread(NULL, (void *) arg);
+               switch_channel_clear_state_handler(channel, &audio_bridge_peer_state_handlers);
+       }
 
        return SWITCH_STATUS_FALSE;
 }