[evolution-data-server] Bug 604550 - e_passwords_shutdown is buggy



commit fdf38d6f85e64ea04618fc06552df2a51493ec90
Author: Wenli <wenlil xandros com>
Date:   Wed Dec 16 19:38:52 2009 -0500

    Bug 604550 - e_passwords_shutdown is buggy
    
    password_cache is destroyed without properly acquiring the lock.

 libedataserverui/e-passwords.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/libedataserverui/e-passwords.c b/libedataserverui/e-passwords.c
index 5133b19..e9e5a7e 100644
--- a/libedataserverui/e-passwords.c
+++ b/libedataserverui/e-passwords.c
@@ -1304,15 +1304,26 @@ e_passwords_cancel (void)
 void
 e_passwords_shutdown (void)
 {
-	e_passwords_cancel ();
+	EPassMsg *msg;
+
+	G_LOCK (passwords);
+
+	while ((msg = g_queue_pop_head (&message_queue)) != NULL)
+		e_flag_set (msg->done);
 
 	if (password_cache != NULL) {
 		g_hash_table_destroy (password_cache);
 		password_cache = NULL;
 	}
+
 #ifdef WITH_GNOME_KEYRING
 	g_free (default_keyring);
 #endif
+
+	G_UNLOCK (passwords);
+
+	if (password_dialog != NULL)
+		gtk_dialog_response (password_dialog, GTK_RESPONSE_CANCEL);
 }
 
 /**



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