aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-01-28 17:04:28 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-01-28 17:04:28 +0800
commit29620d17ab079c70a475af56f4e7e7cbe09b59cc (patch)
tree1aefeaae35cfe8e0c008e7ddfd56223d87f94373
parent7d76d9858a79a758acbadff96417018d0b9a13d8 (diff)
downloadgsoc2013-evolution-29620d17ab079c70a475af56f4e7e7cbe09b59cc.tar.gz
gsoc2013-evolution-29620d17ab079c70a475af56f4e7e7cbe09b59cc.tar.zst
gsoc2013-evolution-29620d17ab079c70a475af56f4e7e7cbe09b59cc.zip
See bug #69815.
2005-01-27 Not Zed <NotZed@Ximian.com> * See bug #69815. * mail-component.c (impl_quit): shutdown vfolders as first step. * mail-vfolder.c (vfolder_setup_do): if we're shutdown during processing, just noop. (vfolder_adduri_do): same. (mail_vfolder_shutdown): set the shutdown flag. svn path=/trunk/; revision=28592
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/mail-component.c2
-rw-r--r--mail/mail-vfolder.c18
3 files changed, 27 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9637217f5d..6ea67b7a2d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2005-01-27 Not Zed <NotZed@Ximian.com>
+
+ * See bug #69815.
+
+ * mail-component.c (impl_quit): shutdown vfolders as first step.
+
+ * mail-vfolder.c (vfolder_setup_do): if we're shutdown during
+ processing, just noop.
+ (vfolder_adduri_do): same.
+ (mail_vfolder_shutdown): set the shutdown flag.
+
2005-01-27 Rodney Dawes <dobey@novell.com>
* mail-config.glade: Fix the labels in the account druid to be
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 7608fe4f84..e5b96aa7cf 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -649,6 +649,8 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev)
int now = time(NULL)/60/60/24, days;
GConfClient *gconf = mail_config_get_gconf_client();
+ mail_vfolder_shutdown();
+
mc->priv->quit_expunge = gconf_client_get_bool(gconf, "/apps/evolution/mail/trash/empty_on_exit", NULL)
&& ((days = gconf_client_get_int(gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL)) == 0
|| (days + gconf_client_get_int(gconf, "/apps/evolution/mail/trash/empty_date", NULL)) <= now);
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index bbb839eb9a..a1a0830ac0 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -59,6 +59,9 @@ static pthread_mutex_t vfolder_lock = PTHREAD_MUTEX_INITIALIZER;
static GList *source_folders_remote; /* list of source folder uri's - remote ones */
static GList *source_folders_local; /* list of source folder uri's - local ones */
static GHashTable *vfolder_hash;
+/* This is a slightly hacky solution to shutting down, we poll this variable in various
+ loops, and just quit processing if it is set. */
+static volatile int shutdown; /* are we shutting down? */
/* more globals ... */
extern CamelSession *session;
@@ -99,7 +102,7 @@ vfolder_setup_do(struct _mail_msg *mm)
camel_vee_folder_set_expression((CamelVeeFolder *)m->folder, m->query);
l = m->sources_uri;
- while (l) {
+ while (l && !shutdown) {
d(printf(" Adding uri: %s\n", (char *)l->data));
folder = mail_tool_uri_to_folder (l->data, 0, &mm->ex);
if (folder) {
@@ -112,14 +115,15 @@ vfolder_setup_do(struct _mail_msg *mm)
}
l = m->sources_folder;
- while (l) {
+ while (l && !shutdown) {
d(printf(" Adding folder: %s\n", ((CamelFolder *)l->data)->full_name));
camel_object_ref(l->data);
list = g_list_append(list, l->data);
l = l->next;
}
- camel_vee_folder_set_folders((CamelVeeFolder *)m->folder, list);
+ if (!shutdown)
+ camel_vee_folder_set_folders((CamelVeeFolder *)m->folder, list);
l = list;
while (l) {
@@ -251,9 +255,13 @@ vfolder_adduri_do(struct _mail_msg *mm)
GList *l;
CamelFolder *folder = NULL;
+ if (shutdown)
+ return;
+
d(printf("%s uri to vfolder: %s\n", m->remove?"Removing":"Adding", m->uri));
/* we dont try lookup the cache if we are removing it, its no longer there */
+
if (!m->remove && !mail_note_get_folder_from_uri(m->uri, &folder)) {
g_warning("Folder '%s' disappeared while I was adding/remove it to/from my vfolder", m->uri);
return;
@@ -264,7 +272,7 @@ vfolder_adduri_do(struct _mail_msg *mm)
if (folder != NULL) {
l = m->folders;
- while (l) {
+ while (l && !shutdown) {
if (m->remove)
camel_vee_folder_remove_folder((CamelVeeFolder *)l->data, folder);
else
@@ -1126,6 +1134,8 @@ vfolder_foreach_cb (gpointer key, gpointer data, gpointer user_data)
void
mail_vfolder_shutdown (void)
{
+ shutdown = 1;
+
g_hash_table_foreach (vfolder_hash, vfolder_foreach_cb, NULL);
g_hash_table_destroy (vfolder_hash);
vfolder_hash = NULL;
me/commit/?h=gstreamer0.10-removal&id=166afedafaa0baad605ef91987a39312774fc6b4'>- Update to a new snapshotjohans2010-06-0928-225/+46 * Upgrade to 3.7.3.thierry2010-06-097-219/+2116 * Upgrade to 0.6.thierry2010-06-097-82/+374 * Upgrade to 3.7.3.thierry2010-06-093-17/+21 * Mark BROKEN, I'm tired to see QAT loosing time trying to build it.itetcu2010-06-091-0/+2 * Upgrade to upstream bugfix release 2.55, removing version hack.mandree2010-06-092-8/+4 * Convert LDCONFIG_DIRS to USE_LDCONFIG.makc2010-06-0916-49/+25 * Convert LDCONFIG_DIRS to USE_LDCONFIG.makc2010-06-091-2/+1 * Convert LDCONFIG_DIRS to USE_LDCONFIG.makc2010-06-091-4/+1 * Add missing shibboleth2-sp entry.wxs2010-06-091-0/+1 * Connect kphotoalbum-kde4makc2010-06-091-0/+1 * Fix RFC2553 optionskreuzer2010-06-081-1/+3 * - Update to 0.5.0.0pgj2010-06-084-6/+29 * - Update to 0.9.24pgj2010-06-082-6/+5 * - Update to 0.2.0.3pgj2010-06-082-4/+4 * - Update to 0.5.1.0pgj2010-06-083-6/+5 * - Update to 0.2.2.1pgj2010-06-082-4/+4 * - Update to 0.5.1pgj2010-06-082-4/+4 * - Update to 1.3.7pgj2010-06-083-5/+6 * - Update to 0.7.1pgj2010-06-082-5/+5 * - Fix pkg-plistpgj2010-06-081-2/+2 * - Update to 0.1.1.1pgj2010-06-082-4/+4 * - Update to 0.9.12pgj2010-06-083-16/+5 * Update to 2.10.3.kwm2010-06-082-4/+4 * - Update to 2.1.2pgj2010-06-082-5/+4 * - Update to 1.5.1pgj2010-06-083-4/+14 * - Update to 0.7.0pgj2010-06-082-4/+4 * - Update to 0.2.1.0pgj2010-06-083-6/+13 * Chase goffice update.kwm2010-06-081-2/+2 * Update to 1.10.5.kwm2010-06-083-6/+10 * Update to 0.8.5.kwm2010-06-082-5/+4 * - Update to 0.10pgj2010-06-082-4/+4 * - Update to 0.3.4pgj2010-06-082-4/+4 * - Update to 0.3.2pgj2010-06-082-5/+5 * - Update to 0.5.0.0pgj2010-06-082-5/+5 * - Update to 0.8pgj2010-06-084-25/+13 * Accordingly update third-party slowfs_cache module from 1.4 to 1.5.osa2010-06-085-27/+8 * Add option for amidi plugin to play MIDI filesoliver2010-06-082-2/+15 * Update to 2.34lth2010-06-082-4/+4 * Update to 0.11006lth2010-06-082-5/+4 * Update to 1.14.tobez2010-06-083-8/+11 * - Update to 1.5.3clsung2010-06-081-3/+3 * - Bumped version to latest upstream. (0.07)clsung2010-06-084-18/+9 * Take maintainershipehaupt2010-06-081-1/+1 * - Update 1.5.0clsung2010-06-083-17/+14 * - Update to 1.5.0clsung2010-06-082-4/+5 * - Update to 0.27wen2010-06-082-4/+4 * - Update to 2.101580wen2010-06-082-4/+4 * Update to 1.8.3 release.ale2010-06-083-4/+9 * Update to 4.5 release.ale2010-06-082-4/+6 * - Update to 1.0clsung2010-06-083-8/+10 * fix WITH_PYTHONoliver2010-06-082-1/+7 * - Drop maintainershipgabor2010-06-0836-36/+36 * emulators/linux_base-gentoo-stage1||2010-06-08|Expired: please use emulators/...gabor2010-06-0811-9761/+2 * - Use BerkeleyDB 4.2 if compiled with WITH_BDB. Using 4.1, which wasgabor2010-06-081-1/+2 * . add run-time dependencies: www/py-qt4-webkit and devel/py-qt4-help; [1]bsam2010-06-081-1/+4 * - Use built-in installation proceduregahr2010-06-082-5/+644 * - Bump PORTREVISION after gettext updategabor2010-06-082-42/+51 * - Update to 0.5.6pgj2010-06-082-4/+4 * - Update to 1.1.0.3pgj2010-06-082-5/+5 * - Update to 0.4.4pgj2010-06-082-4/+4 * - Update to 1.0.10pgj2010-06-082-4/+4 * - Update to 0.3.2.3pgj2010-06-082-4/+4 * Update to 0.08122az2010-06-083-8/+13 * - Update to 1.9.0pgj2010-06-082-4/+4 * Update to 0.09003az2010-06-082-5/+6 * - Update to 0.2pgj2010-06-082-4/+6 * - Update to 1.0.9pgj2010-06-082-4/+4 * - Update to 0.2.6pgj2010-06-082-4/+4 * - Update to 3001.1.8.1pgj2010-06-082-4/+6 * - Update to 0.3.0.1pgj2010-06-082-4/+4 * Accordingly update third-party cache_purge module from 1.0 to 1.1.osa2010-06-084-8/+8 * - Update 0.4.2.0pgj2010-06-082-4/+4 * - Update to 0.5.2pgj2010-06-082-4/+4 * Update to 1.0.1.knu2010-06-084-19/+7 * - Update to 7.3sahil2010-06-082-6/+7 * - Update to 2.2.14sahil2010-06-082-9/+6 * - Update to 0.7.0pgollucci2010-06-083-66/+6 * - Update to 1.10pgollucci2010-06-082-5/+6 * - Update to 0.6.4pgollucci2010-06-084-8/+8 * - Update to 1.8.1pgollucci2010-06-082-5/+4 * - Update to 0.1.3pgollucci2010-06-082-5/+5 * - Update to 2.0.5pgollucci2010-06-082-5/+5 * - Update to 1.4.0pgollucci2010-06-083-75/+188 * Ports modules update at Tuesday 08 June 2010 at 00:09edwin2010-06-081-2/+12 * - Add LICENSE_{NAME,PERM,TEXT} to make bsd.licenses.mk happysylvio2010-06-081-2/+5 * - sort the pkg-plits in prep for updatepgollucci2010-06-081-12/+12 * - Update to 11.6dhn2010-06-083-5/+7 * - Use LOCAL macropgollucci2010-06-0810-23/+11 * - Convert to RF macropgollucci2010-06-0826-43/+28 * send some ruby- ports to ruby@pgollucci2010-06-085-5/+5 * - Utilise common bsd.squirrelmail.mktabthorpe2010-06-086-260/+26 * - Update my email in pkg-message and location of snmpd.confsylvio2010-06-081-3/+3 * - Update to 1.2.8.6sylvio2010-06-083-5/+5 * Patch for NTP bugzilla id 1080.cy2010-06-082-0/+22 * Patch for NTP bugzilla id 1080.cy2010-06-082-0/+22 * - To apache@pgollucci2010-06-081-1/+1 * - Convert to AP_FAST_BUILD / AP_GENPLISTleeym2010-06-082-14/+8 * - update to 10.05dinoex2010-06-084-99/+703 * Reset maintainer at his request (in followup to ports/147500).linimon2010-06-082-4/+1 * Update to 0.047ehaupt2010-06-082-4/+4 * - update to 8bdinoex2010-06-082-6/+6 * - update to 1.0.PreAlpha35.0dinoex2010-06-082-5/+5 * - Update to 1.3.2dhn2010-06-082-5/+4 * - Update to 3.2.2beat2010-06-085-28/+20 * - Update to 3.2.2beat2010-06-0844-858/+222 * - Update to 3.2.2beat2010-06-0822-1952/+22 * - Another attempt to fix build when using some locale settings.romain2010-06-081-1/+1 * - Update to 0.5.4dhn2010-06-072-4/+4 * - Update to 0.11.skv2010-06-072-6/+6 * Update to 0.85skv2010-06-073-5/+11 * Update Readonly-XS to 1.05skv2010-06-072-5/+5 * Unbreak build for RELENG_8 and later.skv2010-06-071-0/+15 * - Provide a knob to not check the APACHE_PORT value or the installed version ...pgollucci2010-06-071-0/+2 * Update from 0.7.65 to 0.7.66.osa2010-06-077-4/+99 * - Update LATEST_LINKmm2010-06-071-0/+2 * Update from 0.8.39 to 0.8.40.osa2010-06-072-4/+6 * Update to 0.30.tobez2010-06-072-4/+4 * Update to 1.10.tobez2010-06-072-4/+4 * Update to 0.19.tobez2010-06-072-7/+5 * - Update plamsa-applet-cwp 0.9.17 -> 1.0.3fluffy2010-06-073-6/+7 * Fix build: USE_AUTOTOOLS automake 1.10 instead of 1.9.lioux2010-06-071-1/+1 * Update to 3.0608.tobez2010-06-072-4/+4 * - [maintainer] update kdesvn-kde4 1.5.2 -> 1.5.3fluffy2010-06-073-6/+7 * - Fix INDEXmiwi2010-06-071-3/+3 * - Enable DSO supportmm2010-06-071-1/+2 * - Add missing entry for x264-develmm2010-06-071-0/+1 * ThunderSnarf is a web reporting and trending tool for Thunder Cache Pro whichgarga2010-06-076-0/+98 * Only apply patch for WITH_GNUSTEP_DEVEL.naddy2010-06-072-0/+4 * - Update to 05_20100606gahr2010-06-072-4/+4 * - Update to 1.1.2gahr2010-06-072-4/+4 * . update gtk2-2.14.7-7.fc10 -> gtk2-2.14.7-9.fc10;bsam2010-06-072-8/+8 * - Update to 0.15wen2010-06-073-4/+19 * PBKDF2 is a secure password hashing algorithm that uses the techniques ofmiwi2010-06-075-0/+71 * - Update to 0.4.0miwi2010-06-078-203/+278 * - Add missing patchmiwi2010-06-071-0/+18 * - Update to 0.5.7miwi2010-06-073-23/+6 * - Update to 0.30miwi2010-06-072-4/+4 * - Update to 0.9.9miwi2010-06-075-113/+83 * - fix package for gnustep-make-2.4.0dinoex2010-06-071-0/+4 * - Convert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-5/+3 * MKLivestatus is a very simple and smart Nagios eventbroker module.miwi2010-06-076-0/+61 * - Conver to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-16/+11 * - Add missing dependence.wen2010-06-071-1/+3 * - Convert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-14/+11 * - Remove unused patch filepgollucci2010-06-071-15/+0 * - Convert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-073-23/+4 * - Covnert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-12/+8 * - Convert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-11/+4 * - Convert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-14/+9 * - Convert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-14/+11 * - Convert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-9/+6 * - Covnert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-8/+4 * Efficient algorithms for vector arrays.pgj2010-06-076-0/+52 * An efficient implementation of Int-indexed arrays (both mutable andpgj2010-06-076-0/+71 * - Convert to AP_FAST_BUILD / AP_GENPLISTpgollucci2010-06-072-7/+3 * Fast, memory-efficient, low-level socket functions that usepgj2010-06-076-0/+47 * - Convert to PORTDOCS/PORTEXAMPLESpgollucci2010-06-072-9/+8 * Some classes for generalized boolean operations.pgj2010-06-076-0/+38 * This package provides wrappers for primitive array operations frompgj2010-06-076-0/+52 * - And finally, convert to AP_FAST_BUILD/AP_GENPLISTpgollucci2010-06-072-12/+9 * - Lets only link one db backend in by defaultpgollucci2010-06-072-2/+4 * - Convert from pre-everything to OPTIONSpgollucci2010-06-071-6/+5 * - Use PORTDOCS and DATADIR (no-ops)pgollucci2010-06-072-10/+6 * Accordingly update third-party headers_more module from 0.09 to 0.10.osa2010-06-074-8/+8 * - fix packagedinoex2010-06-071-1/+1 * Don't remove en_GB locale directory.naddy2010-06-072-2/+1 * --------------------------------------------------------------------------------pgollucci2010-06-076-60/+1 * Apply a quick-fix against the problem introduced in 3.00g.knu2010-06-072-0/+15 * - Fix missing MAN1 page.pgollucci2010-06-071-1/+1 * - Update to 0.6pgollucci2010-06-073-6/+8 * - Fix for non standard LOCALBASEpgollucci2010-06-071-0/+4 * Ports modules update at Monday 07 June 2010 at 00:09edwin2010-06-071-1/+9 * - Add LC_ALL=C to MAKE_ENV to fix some build issues (same as lang/mono).romain2010-06-071-0/+5 * Remove bms from the pkg-descr's of ports he no longer maintains.dougb2010-06-0715-45/+0 * - Dependency on x11-toolkits/p5-Tk optionalsylvio2010-06-072-3/+13 * - Fix plistpav2010-06-072-0/+4 * - devel/subversion pulls in the correct aprpgollucci2010-06-071-4/+2 * - apr should always be a LIB_DEPENDSpgollucci2010-06-071-1/+2 * Whois is an intelligent pure Ruby WHOIS client and parser.pgollucci2010-06-074-0/+37 * Bump PORTREVISION for ports that depend on libogg, directly or indirectlynaddy2010-06-07