[evolution-ews] Use common property lock provided by ESourceExtension
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Use common property lock provided by ESourceExtension
- Date: Tue, 24 Mar 2015 07:20:04 +0000 (UTC)
commit a511954b4f55521d57fb1ee6f6e401fc568b8542
Author: Milan Crha <mcrha redhat com>
Date: Tue Mar 24 08:19:17 2015 +0100
Use common property lock provided by ESourceExtension
src/server/e-source-ews-folder.c | 28 ++++++++++++----------------
1 files changed, 12 insertions(+), 16 deletions(-)
---
diff --git a/src/server/e-source-ews-folder.c b/src/server/e-source-ews-folder.c
index 48efbb2..461048d 100644
--- a/src/server/e-source-ews-folder.c
+++ b/src/server/e-source-ews-folder.c
@@ -27,7 +27,6 @@
((obj), E_TYPE_SOURCE_EWS_FOLDER, ESourceEwsFolderPrivate))
struct _ESourceEwsFolderPrivate {
- GMutex property_lock;
gchar *change_key;
gchar *id;
gboolean foreign;
@@ -143,8 +142,6 @@ source_ews_folder_finalize (GObject *object)
priv = E_SOURCE_EWS_FOLDER_GET_PRIVATE (object);
- g_mutex_clear (&priv->property_lock);
-
g_free (priv->change_key);
g_free (priv->id);
@@ -239,7 +236,6 @@ static void
e_source_ews_folder_init (ESourceEwsFolder *extension)
{
extension->priv = E_SOURCE_EWS_FOLDER_GET_PRIVATE (extension);
- g_mutex_init (&extension->priv->property_lock);
}
void
@@ -266,12 +262,12 @@ e_source_ews_folder_dup_change_key (ESourceEwsFolder *extension)
g_return_val_if_fail (E_IS_SOURCE_EWS_FOLDER (extension), NULL);
- g_mutex_lock (&extension->priv->property_lock);
+ e_source_extension_property_lock (E_SOURCE_EXTENSION (extension));
protected = e_source_ews_folder_get_change_key (extension);
duplicate = g_strdup (protected);
- g_mutex_unlock (&extension->priv->property_lock);
+ e_source_extension_property_unlock (E_SOURCE_EXTENSION (extension));
return duplicate;
}
@@ -282,17 +278,17 @@ e_source_ews_folder_set_change_key (ESourceEwsFolder *extension,
{
g_return_if_fail (E_IS_SOURCE_EWS_FOLDER (extension));
- g_mutex_lock (&extension->priv->property_lock);
+ e_source_extension_property_lock (E_SOURCE_EXTENSION (extension));
if (g_strcmp0 (extension->priv->change_key, change_key) == 0) {
- g_mutex_unlock (&extension->priv->property_lock);
+ e_source_extension_property_unlock (E_SOURCE_EXTENSION (extension));
return;
}
g_free (extension->priv->change_key);
extension->priv->change_key = g_strdup (change_key);
- g_mutex_unlock (&extension->priv->property_lock);
+ e_source_extension_property_unlock (E_SOURCE_EXTENSION (extension));
g_object_notify (G_OBJECT (extension), "change-key");
}
@@ -313,12 +309,12 @@ e_source_ews_folder_dup_id (ESourceEwsFolder *extension)
g_return_val_if_fail (E_IS_SOURCE_EWS_FOLDER (extension), NULL);
- g_mutex_lock (&extension->priv->property_lock);
+ e_source_extension_property_lock (E_SOURCE_EXTENSION (extension));
protected = e_source_ews_folder_get_id (extension);
duplicate = g_strdup (protected);
- g_mutex_unlock (&extension->priv->property_lock);
+ e_source_extension_property_unlock (E_SOURCE_EXTENSION (extension));
return duplicate;
}
@@ -329,17 +325,17 @@ e_source_ews_folder_set_id (ESourceEwsFolder *extension,
{
g_return_if_fail (E_IS_SOURCE_EWS_FOLDER (extension));
- g_mutex_lock (&extension->priv->property_lock);
+ e_source_extension_property_lock (E_SOURCE_EXTENSION (extension));
if (g_strcmp0 (extension->priv->id, id) == 0) {
- g_mutex_unlock (&extension->priv->property_lock);
+ e_source_extension_property_unlock (E_SOURCE_EXTENSION (extension));
return;
}
g_free (extension->priv->id);
extension->priv->id = g_strdup (id);
- g_mutex_unlock (&extension->priv->property_lock);
+ e_source_extension_property_unlock (E_SOURCE_EXTENSION (extension));
g_object_notify (G_OBJECT (extension), "id");
}
@@ -352,12 +348,12 @@ e_source_ews_folder_dup_folder_id (ESourceEwsFolder *extension)
g_return_val_if_fail (E_IS_SOURCE_EWS_FOLDER (extension), NULL);
- g_mutex_lock (&extension->priv->property_lock);
+ e_source_extension_property_lock (E_SOURCE_EXTENSION (extension));
folder_id = e_ews_folder_id_new (
extension->priv->id, extension->priv->change_key, FALSE);
- g_mutex_unlock (&extension->priv->property_lock);
+ e_source_extension_property_unlock (E_SOURCE_EXTENSION (extension));
return folder_id;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]