Re: [BUG] : Ask password hangs (<-- bugzilla)
- From: Pawel Salek <pawsa theochem kth se>
- To: Emmanuel <e allaud wanadoo fr>
- Cc: balsa-list gnome org
- Subject: Re: [BUG] : Ask password hangs (<-- bugzilla)
- Date: Mon, 25 Feb 2002 18:49:48 +0100
On 2002.02.25 12:56 Emmanuel wrote:
> Hi all,
> I saw this bug on bugzilla and looked at the code in src/balsa_app.c,
> try this :
> in ask_password(2) replace the call to ask_password_mt by
> ask_password_real (ie use same function for threaded/non-threaded
> code). It just works for me! In fact I do not understand why there
> was so much complexity.
Is it regarding #72253?
The complexity is there to be able to ask for a password from a thread.
The mail checking runs as a thread but a thread cannot enther
g_main_loop (IIRC the name of the routine) when the main thread is
already running it (this is why you cannot run ask_password_real from a
thread). Therefore, one needs to ask the main thread to pop up the
password dialog, and the thread must wait on a cond_var until the
dialog is closed. Apparently, there is a deadlock somewhere.
Thinking about it, probably running fill_mailbox_passwords from the
main thread is a mistake in this context. My first action would be to
remove this call. The authorization handling just does not belong
there, IMO, and it introduces assymetry in respect to POP3 mailboxes.
(Generally, I am not sure whether the code implements the optimal
solution but it was a definetely a step in the right direction, i.e.
separation of UI and mailbox handling functions; libmutt is a mess in
this respect; see also reset_mutt_passwords).
> Please tell me if this also works for you or how it breaks (to do the
> test you must unset the password or the mailbox, be sure to remember
> the password though ;-).
> If everyone is happy I'll submit a patch to clear things a bit.
] [Thread Prev