[evolution-kolab/ek-wip-porting] KolabMailAccess: GLib 2.32 GMutex fixups
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting] KolabMailAccess: GLib 2.32 GMutex fixups
- Date: Fri, 15 Jun 2012 14:23:26 +0000 (UTC)
commit d00bb6c5031f0ba0e8abf4bb84da4222edda4e70
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Jun 15 16:13:53 2012 +0200
KolabMailAccess: GLib 2.32 GMutex fixups
* g_mutex_new() / g_mutex_free() have been deprecated
in GLib 2.32 in favor of g_mutex_init() / g_mutex_clear()
src/libekolab/kolab-mail-access.c | 66 ++++++++++++++++++------------------
1 files changed, 33 insertions(+), 33 deletions(-)
---
diff --git a/src/libekolab/kolab-mail-access.c b/src/libekolab/kolab-mail-access.c
index c644893..d1a4ed7 100644
--- a/src/libekolab/kolab-mail-access.c
+++ b/src/libekolab/kolab-mail-access.c
@@ -65,7 +65,7 @@ struct _KolabMailAccessPrivate
GHashTable *stranstbl;
GHashTable *handles; /* foldername:uid:handle */
- GMutex *big_lock;
+ GMutex big_lock;
};
#define KOLAB_MAIL_ACCESS_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), KOLAB_TYPE_MAIL_ACCESS, KolabMailAccessPrivate))
@@ -120,7 +120,7 @@ kolab_mail_access_init (KolabMailAccess *object)
priv->stranstbl = kolab_mail_access_new_strans_table ();
priv->handles = NULL;
- priv->big_lock = g_mutex_new ();
+ g_mutex_init (&(priv->big_lock));
}
static void
@@ -178,9 +178,9 @@ kolab_mail_access_finalize (GObject *object)
if (priv->stranstbl)
g_hash_table_destroy (priv->stranstbl);
- g_mutex_lock (priv->big_lock);
- g_mutex_unlock (priv->big_lock);
- g_mutex_free (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
+ g_mutex_unlock (&(priv->big_lock));
+ g_mutex_clear (&(priv->big_lock));
G_OBJECT_CLASS (kolab_mail_access_parent_class)->finalize (object);
}
@@ -1611,7 +1611,7 @@ kolab_mail_access_configure (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode == KOLAB_MAIL_ACCESS_OPMODE_SHUTDOWN) {
g_set_error (&tmp_err,
@@ -1675,7 +1675,7 @@ kolab_mail_access_configure (KolabMailAccess *self,
ok = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return ok;
}
@@ -1855,7 +1855,7 @@ kolab_mail_access_set_opmode (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
/* check whether we are in required opmode already */
if (opmode == priv->state->opmode)
@@ -1901,7 +1901,7 @@ kolab_mail_access_set_opmode (KolabMailAccess *self,
strans_ok = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return strans_ok;
}
@@ -1929,11 +1929,11 @@ kolab_mail_access_get_opmode (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
opmode = priv->state->opmode;
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return opmode;
}
@@ -1985,7 +1985,7 @@ kolab_mail_access_query_uids (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2015,7 +2015,7 @@ kolab_mail_access_query_uids (KolabMailAccess *self,
}
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return uids;
}
@@ -2067,7 +2067,7 @@ kolab_mail_access_query_changed_uids (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2112,7 +2112,7 @@ kolab_mail_access_query_changed_uids (KolabMailAccess *self,
}
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return changed_uids_lst;
}
@@ -2166,7 +2166,7 @@ kolab_mail_access_get_handle (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2233,7 +2233,7 @@ kolab_mail_access_get_handle (KolabMailAccess *self,
handle = NULL;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return handle;
}
@@ -2317,7 +2317,7 @@ kolab_mail_access_store_handle (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2395,7 +2395,7 @@ kolab_mail_access_store_handle (KolabMailAccess *self,
ok = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return ok;
}
@@ -2452,7 +2452,7 @@ kolab_mail_access_retrieve_handle (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2556,7 +2556,7 @@ kolab_mail_access_retrieve_handle (KolabMailAccess *self,
ok = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return ok;
}
@@ -2612,7 +2612,7 @@ kolab_mail_access_delete_handle (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2663,7 +2663,7 @@ kolab_mail_access_delete_handle (KolabMailAccess *self,
ok = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return ok;
}
@@ -2711,7 +2711,7 @@ kolab_mail_access_delete_by_uid (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2760,7 +2760,7 @@ kolab_mail_access_delete_by_uid (KolabMailAccess *self,
ok = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return ok;
}
@@ -2809,7 +2809,7 @@ kolab_mail_access_query_sources (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2861,7 +2861,7 @@ kolab_mail_access_query_sources (KolabMailAccess *self,
}
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return sources;
}
@@ -2907,7 +2907,7 @@ kolab_mail_access_create_source (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -2945,7 +2945,7 @@ kolab_mail_access_create_source (KolabMailAccess *self,
ok = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return ok;
}
@@ -2997,7 +2997,7 @@ kolab_mail_access_delete_source (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED)
goto exit;
@@ -3037,7 +3037,7 @@ kolab_mail_access_delete_source (KolabMailAccess *self,
ok = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return ok;
}
@@ -3078,7 +3078,7 @@ kolab_mail_access_source_fbtrigger_needed (KolabMailAccess *self,
priv = KOLAB_MAIL_ACCESS_PRIVATE (self);
- g_mutex_lock (priv->big_lock);
+ g_mutex_lock (&(priv->big_lock));
/* do not try to trigger if in offline mode */
if (priv->state->opmode <= KOLAB_MAIL_ACCESS_OPMODE_OFFLINE)
@@ -3123,7 +3123,7 @@ kolab_mail_access_source_fbtrigger_needed (KolabMailAccess *self,
trigger_needed = FALSE;
}
- g_mutex_unlock (priv->big_lock);
+ g_mutex_unlock (&(priv->big_lock));
return trigger_needed;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]