[evolution-ews/gnome-3-4] Bug #669460 - Can pick freed connection



commit e867f708984629e3f21d3075ac0085c8d4f52ee0
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jul 16 19:12:41 2012 +0200

    Bug #669460 - Can pick freed connection

 src/server/e-ews-connection.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index c1ffa5c..50355d3 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -937,6 +937,8 @@ e_ews_connection_dispose (GObject *object)
 
 	priv = cnc->priv;
 
+	g_static_mutex_lock (&connecting);
+
 	/* remove the connection from the hash table */
 	if (loaded_connections_permissions != NULL) {
 		hash_key = g_strdup_printf ("%s %s",
@@ -950,9 +952,11 @@ e_ews_connection_dispose (GObject *object)
 		g_free (hash_key);
 	}
 
-	g_signal_handlers_disconnect_by_func (priv->soup_session, ews_connection_authenticate, cnc);
+	g_static_mutex_unlock (&connecting);
 
 	if (priv->soup_session) {
+		g_signal_handlers_disconnect_by_func (priv->soup_session, ews_connection_authenticate, cnc);
+
 		g_main_loop_quit (priv->soup_loop);
 		g_thread_join (priv->soup_thread);
 		priv->soup_thread = NULL;



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