[evolution-data-server] Use recursive lock for camel_binding_* proxy functions
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Use recursive lock for camel_binding_* proxy functions
- Date: Tue, 24 Feb 2015 09:44:37 +0000 (UTC)
commit 74e8eac0b170f558b2a09f11650bd17cb814954b
Author: Milan Crha <mcrha redhat com>
Date: Tue Feb 24 10:43:54 2015 +0100
Use recursive lock for camel_binding_* proxy functions
camel/camel-network-service.c | 1 +
camel/camel.c | 14 +++++++-------
camel/providers/imapx/camel-imapx-server.c | 2 ++
3 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/camel/camel-network-service.c b/camel/camel-network-service.c
index e7f3d21..76a8d76 100644
--- a/camel/camel-network-service.c
+++ b/camel/camel-network-service.c
@@ -24,6 +24,7 @@
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
+#include "camel.h"
#include <camel/camel-enumtypes.h>
#include <camel/camel-network-settings.h>
#include <camel/camel-service.h>
diff --git a/camel/camel.c b/camel/camel.c
index eaba503..8505c95 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -267,7 +267,7 @@ camel_shutdown (void)
initialised = FALSE;
}
-G_LOCK_DEFINE_STATIC (camel_binding_lock);
+static GRecMutex camel_binding_lock;
/**
* camel_binding_bind_property:
@@ -286,11 +286,11 @@ camel_binding_bind_property (gpointer source,
{
GBinding *binding;
- G_LOCK (camel_binding_lock);
+ g_rec_mutex_lock (&camel_binding_lock);
binding = g_object_bind_property (source, source_property, target, target_property, flags);
- G_UNLOCK (camel_binding_lock);
+ g_rec_mutex_unlock (&camel_binding_lock);
return binding;
}
@@ -316,12 +316,12 @@ camel_binding_bind_property_full (gpointer source,
{
GBinding *binding;
- G_LOCK (camel_binding_lock);
+ g_rec_mutex_lock (&camel_binding_lock);
binding = g_object_bind_property_full (source, source_property, target, target_property, flags,
transform_to, transform_from, user_data, notify);
- G_UNLOCK (camel_binding_lock);
+ g_rec_mutex_unlock (&camel_binding_lock);
return binding;
}
@@ -345,12 +345,12 @@ camel_binding_bind_property_with_closures (gpointer source,
{
GBinding *binding;
- G_LOCK (camel_binding_lock);
+ g_rec_mutex_lock (&camel_binding_lock);
binding = g_object_bind_property_with_closures (source, source_property, target, target_property,
flags,
transform_to, transform_from);
- G_UNLOCK (camel_binding_lock);
+ g_rec_mutex_unlock (&camel_binding_lock);
return binding;
}
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 05f119b..12da658 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -33,6 +33,8 @@
#include <glib-unix.h>
#endif /* G_OS_WIN32 */
+#include <camel/camel.h>
+
#include "camel-imapx-server.h"
#include "camel-imapx-folder.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]