[rhythmbox] metadata: use GMutex instead of GStaticMutex



commit 53beafc67d3c221e314c793a00b7d27c2ac05305
Author: Jonathan Matthew <jonathan d14n org>
Date:   Thu Dec 5 13:22:18 2013 +1000

    metadata: use GMutex instead of GStaticMutex

 metadata/rb-metadata-dbus-client.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/metadata/rb-metadata-dbus-client.c b/metadata/rb-metadata-dbus-client.c
index ed1bea5..4245bcb 100644
--- a/metadata/rb-metadata-dbus-client.c
+++ b/metadata/rb-metadata-dbus-client.c
@@ -79,7 +79,7 @@ static GDBusConnection *dbus_connection = NULL;
 static GPid metadata_child = 0;
 static int metadata_stdout = -1;
 static GMainContext *main_context = NULL;
-static GStaticMutex conn_mutex = G_STATIC_MUTEX_INIT;
+static GMutex conn_mutex;
 static char **saveable_types = NULL;
 
 struct RBMetaDataPrivate
@@ -387,7 +387,7 @@ rb_metadata_load (RBMetaData *md,
        rb_metadata_reset (md);
        if (uri == NULL)
                return;
-       g_static_mutex_lock (&conn_mutex);
+       g_mutex_lock (&conn_mutex);
 
        start_metadata_service (error);
 
@@ -472,7 +472,7 @@ rb_metadata_load (RBMetaData *md,
        if (fake_error)
                g_error_free (fake_error);
 
-       g_static_mutex_unlock (&conn_mutex);
+       g_mutex_unlock (&conn_mutex);
 }
 
 /**
@@ -611,12 +611,12 @@ rb_metadata_can_save (RBMetaData *md, const char *media_type)
        gboolean result = FALSE;
        int i = 0;
 
-       g_static_mutex_lock (&conn_mutex);
+       g_mutex_lock (&conn_mutex);
 
        if (saveable_types == NULL) {
                if (start_metadata_service (&error) == FALSE) {
                        g_warning ("unable to start metadata service: %s", error->message);
-                       g_static_mutex_unlock (&conn_mutex);
+                       g_mutex_unlock (&conn_mutex);
                        g_error_free (error);
                        return FALSE;
                }
@@ -631,7 +631,7 @@ rb_metadata_can_save (RBMetaData *md, const char *media_type)
                }
        }
 
-       g_static_mutex_unlock (&conn_mutex);
+       g_mutex_unlock (&conn_mutex);
        return result;
 }
 
@@ -669,7 +669,7 @@ rb_metadata_save (RBMetaData *md, const char *uri, GError **error)
        if (error == NULL)
                error = &fake_error;
 
-       g_static_mutex_lock (&conn_mutex);
+       g_mutex_lock (&conn_mutex);
 
        start_metadata_service (error);
 
@@ -707,7 +707,7 @@ rb_metadata_save (RBMetaData *md, const char *uri, GError **error)
        if (fake_error)
                g_error_free (fake_error);
 
-       g_static_mutex_unlock (&conn_mutex);
+       g_mutex_unlock (&conn_mutex);
 }
 
 gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]