[evolution-mapi/gnome-3-6] Bug #692371 - Crash under e_mapi_connection_connected()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi/gnome-3-6] Bug #692371 - Crash under e_mapi_connection_connected()
- Date: Wed, 23 Jan 2013 12:58:34 +0000 (UTC)
commit d623ce597f22b87ba5dce8e34a8dfc00b7883d7d
Author: Milan Crha <mcrha redhat com>
Date: Wed Jan 23 13:58:04 2013 +0100
Bug #692371 - Crash under e_mapi_connection_connected()
src/libexchangemapi/e-mapi-connection.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/libexchangemapi/e-mapi-connection.c b/src/libexchangemapi/e-mapi-connection.c
index 6c6ea56..3a68e7c 100644
--- a/src/libexchangemapi/e-mapi-connection.c
+++ b/src/libexchangemapi/e-mapi-connection.c
@@ -427,10 +427,6 @@ e_mapi_connection_finalize (GObject *object)
g_hash_table_destroy (priv->foreign_stores);
priv->foreign_stores = NULL;
- UNLOCK ();
- e_mapi_cancellable_rec_mutex_clear (&priv->session_lock);
- g_static_rec_mutex_free (&priv->folders_lock);
-
e_mapi_utils_destroy_mapi_context (priv->mapi_ctx);
priv->mapi_ctx = NULL;
@@ -443,6 +439,11 @@ e_mapi_connection_finalize (GObject *object)
if (priv->registry)
g_object_unref (priv->registry);
priv->registry = NULL;
+
+ UNLOCK ();
+
+ e_mapi_cancellable_rec_mutex_clear (&priv->session_lock);
+ g_static_rec_mutex_free (&priv->folders_lock);
}
if (G_OBJECT_CLASS (e_mapi_connection_parent_class)->finalize)
@@ -755,6 +756,8 @@ e_mapi_connection_connected (EMapiConnection *conn)
CHECK_CORRECT_CONN_AND_GET_PRIV (conn, FALSE);
+ LOCK (NULL, NULL, FALSE);
+
res = priv->session != NULL;
if (res) {
struct mapi_profile profile = { 0 };
@@ -765,6 +768,8 @@ e_mapi_connection_connected (EMapiConnection *conn)
}
}
+ UNLOCK ();
+
return res;
}
@@ -991,6 +996,7 @@ e_mapi_connection_get_store_quotas (EMapiConnection *conn,
e_return_val_mapi_error_if_fail (receive_quota != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
e_return_val_mapi_error_if_fail (send_quota != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+ LOCK (cancellable, perror, FALSE);
use_store = obj_store;
if (!use_store)
use_store = &priv->msg_store;
@@ -999,7 +1005,6 @@ e_mapi_connection_get_store_quotas (EMapiConnection *conn,
*receive_quota = -1;
*send_quota = -1;
- LOCK (cancellable, perror, FALSE);
mem_ctx = talloc_new (priv->session);
if (g_cancellable_set_error_if_cancelled (cancellable, perror)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]