Skip to content

Instantly share code, notes, and snippets.

@shadeslayer
Created January 13, 2012 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadeslayer/1607267 to your computer and use it in GitHub Desktop.
Save shadeslayer/1607267 to your computer and use it in GitHub Desktop.
Since GLib 2.31 GStaticRecMutex has been deprecated and GRecMutex is used instead. We do not need to initialize GRecMutex since it is static
diff --git a/agent/agent.c b/agent/agent.c
index 298a8ec..2adeb30 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -120,7 +120,7 @@ enum
static guint signals[N_SIGNALS];
-static GStaticRecMutex agent_mutex = G_STATIC_REC_MUTEX_INIT; /* Mutex used for thread-safe lib */
+static GRecMutex agent_mutex; /* Mutex used for thread-safe lib */
static gboolean priv_attach_stream_component (NiceAgent *agent,
Stream *stream,
@@ -132,12 +132,12 @@ static void priv_free_upnp (NiceAgent *agent);
void agent_lock (void)
{
- g_static_rec_mutex_lock (&agent_mutex);
+ g_rec_mutex_lock (&agent_mutex);
}
void agent_unlock (void)
{
- g_static_rec_mutex_unlock (&agent_mutex);
+ g_rec_mutex_unlock (&agent_mutex);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment