From 52af76d0932bfc2b1acd622a681328c01c946382 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Tue, 15 Aug 2000 16:40:01 +0000 Subject: Don't deadlock on PGP key request svn path=/trunk/; revision=4841 --- mail/ChangeLog | 3 +++ mail/session.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 587f9305c8..35d84a2406 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,6 @@ +2000-08-15 Peter Williams + + * session.c (mail_request_dialog): Don't deadlock when in main thread. 2000-08-14 Peter Williams * mail-threads.c (show_error): Fix the error dialogs. diff --git a/mail/session.c b/mail/session.c index 9f9072e93f..161536022e 100644 --- a/mail/session.c +++ b/mail/session.c @@ -45,9 +45,14 @@ mail_request_dialog (const char *prompt, gboolean secret, const char *key, request_callback, &ans, NULL); if (!dialog) return NULL; + GDK_THREADS_ENTER (); if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == -1 || - ans == NULL) + ans == NULL) { + GDK_THREADS_LEAVE (); return NULL; + } + + GDK_THREADS_LEAVE (); } else { if (!mail_op_get_password ((char *) prompt, secret, &ans)) return NULL; -- cgit