mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-11 03:57:14 +00:00
fix race condition in state thread
This commit is contained in:
1 parent
31865f0dc4
commit
ee7dd033fd
5 files changed
+41
-9
No files matched your search
@@ -2288,6 +2288,13 @@ SWITCH_DECLARE(void) switch_channel_state_thread_lock(switch_channel_t *channel)
|
||||
switch_mutex_lock(channel->thread_mutex);
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_state_thread_trylock(switch_channel_t *channel)
|
||||
{
|
||||
return switch_mutex_trylock(channel->thread_mutex);
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_state_thread_unlock(switch_channel_t *channel)
|
||||
{
|
||||
switch_mutex_unlock(channel->thread_mutex);
|
||||
|
||||
Reference in new issue
Block a user