Commit 1deee693 authored by Olivier Crête's avatar Olivier Crête 👻
Browse files

agent: Replace recursive mutex with non-recursive

This should prevent us from re-adding re-entrancy in the future
parent ca0f5c6d
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment