aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-02-25 11:39:12 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-02-25 11:39:12 +0800
commitd8e8d0fd5040f666121503665914774b34489ed0 (patch)
treec5f7dad1984cca472ed08e6e3b86169cd4b4ecf8 /mail
parent762d734b9a92e245c2b03d8681d4e171732242be (diff)
downloadgsoc2013-evolution-d8e8d0fd5040f666121503665914774b34489ed0.tar.gz
gsoc2013-evolution-d8e8d0fd5040f666121503665914774b34489ed0.tar.zst
gsoc2013-evolution-d8e8d0fd5040f666121503665914774b34489ed0.zip
** See bug #71003
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. svn path=/trunk/; revision=28884
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-component.c14
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;