diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-component.c | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 1b961d0c82..10d252b167 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2005-02-21 Not Zed <NotZed@Ximian.com> + + ** See bug #71003 + + * mail-component.c (impl_quit): add a new state MC_QUIT_THREADS to + wait for all mail threads to finish before quitting. + 2005-02-23 Jeffrey Stedfast <fejj@novell.com> * em-format-html.c (efh_format_header): Don't use the pre-UTF-8 diff --git a/mail/mail-component.c b/mail/mail-component.c index bd322ebf18..817d23114f 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -111,7 +111,7 @@ struct _MailComponentPrivate { GMutex *lock; /* states/data used during shutdown */ - enum { MC_QUIT_START, MC_QUIT_SYNC } quit_state; + enum { MC_QUIT_START, MC_QUIT_SYNC, MC_QUIT_THREADS } quit_state; int quit_count; int quit_expunge; /* expunge on quit this time around? */ @@ -692,8 +692,16 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev) } /* Falls through */ case MC_QUIT_SYNC: - return mc->priv->quit_count == 0; - /* What else do we need to do at quit time? */ + if (mc->priv->quit_count > 0) + return TRUE; + + mail_cancel_all(); + mc->priv->quit_state = MC_QUIT_THREADS; + + /* Falls through */ + case MC_QUIT_THREADS: + /* should we keep cancelling? */ + return mail_msg_active((unsigned int)-1) == 0; } return TRUE; |