add rwlocks to bridge

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4323 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-02-19 15:20:16 +00:00
parent ee101704d7
commit 962c8ba4f2
1 changed files with 5 additions and 1 deletions

View File

@ -1965,7 +1965,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
pre_b = switch_channel_test_flag(chan_a, CF_EARLY_MEDIA);
ans_b = switch_channel_test_flag(chan_b, CF_ANSWERED);
}
switch_core_session_read_lock(session_a);
switch_core_session_read_lock(session_b);
switch_channel_set_flag(chan_a, CF_BRIDGED);
@ -2091,6 +2092,9 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
switch_mutex_lock(data->mutex);
data->running = 0;
switch_mutex_unlock(data->mutex);
switch_core_session_rwunlock(session_a);
switch_core_session_rwunlock(session_b);
return NULL;
}