diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-02-24 18:51:31 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-02-24 18:56:42 -0500 |
commit | 1deee69325284c726c3a8380a7d5839a51e20c48 (patch) | |
tree | de1b196b76e5abbf0241f4bb35962cbd0e3e37e0 /agent | |
parent | ca0f5c6d8d1b69c1c334b0826a56796905e6c9d8 (diff) | |
download | libnice-1deee69325284c726c3a8380a7d5839a51e20c48.tar.gz |
agent: Replace recursive mutex with non-recursive
This should prevent us from re-adding re-entrancy in the future
Diffstat (limited to 'agent')
-rw-r--r-- | agent/agent.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/agent/agent.c b/agent/agent.c index 021f0e7..4395f3b 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -127,9 +127,9 @@ enum static guint signals[N_SIGNALS]; #if GLIB_CHECK_VERSION(2,31,8) -static GRecMutex agent_mutex; /* Mutex used for thread-safe lib */ +static GMutex agent_mutex; /* Mutex used for thread-safe lib */ #else -static GStaticRecMutex agent_mutex = G_STATIC_REC_MUTEX_INIT; +static GStaticMutex agent_mutex = G_STATIC_REC_MUTEX_INIT; #endif static void priv_free_upnp (NiceAgent *agent); @@ -137,23 +137,23 @@ static void priv_free_upnp (NiceAgent *agent); #if GLIB_CHECK_VERSION(2,31,8) void agent_lock (void) { - g_rec_mutex_lock (&agent_mutex); + g_mutex_lock (&agent_mutex); } void agent_unlock (void) { - g_rec_mutex_unlock (&agent_mutex); + g_mutex_unlock (&agent_mutex); } #else void agent_lock(void) { - g_static_rec_mutex_lock (&agent_mutex); + g_static_mutex_lock (&agent_mutex); } void agent_unlock(void) { - g_static_rec_mutex_unlock (&agent_mutex); + g_static_mutex_unlock (&agent_mutex); } #endif |