mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-01 11:02:53 +00:00
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:
parent
ee101704d7
commit
962c8ba4f2
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user