aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-remote-store.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-07-14 01:35:51 +0800
committerPeter Williams <peterw@src.gnome.org>2001-07-14 01:35:51 +0800
commit54e037a91cf1de9d82f87675e1bf857d90763f4d (patch)
tree65a5f80979106de683a0ae5b712060eae5c4d1ec /camel/camel-remote-store.c
parentfd982262e8f6b1ce2002641bce8e46e324e60296 (diff)
downloadgsoc2013-evolution-54e037a91cf1de9d82f87675e1bf857d90763f4d.tar
gsoc2013-evolution-54e037a91cf1de9d82f87675e1bf857d90763f4d.tar.gz
gsoc2013-evolution-54e037a91cf1de9d82f87675e1bf857d90763f4d.tar.bz2
gsoc2013-evolution-54e037a91cf1de9d82f87675e1bf857d90763f4d.tar.lz
gsoc2013-evolution-54e037a91cf1de9d82f87675e1bf857d90763f4d.tar.xz
gsoc2013-evolution-54e037a91cf1de9d82f87675e1bf857d90763f4d.tar.zst
gsoc2013-evolution-54e037a91cf1de9d82f87675e1bf857d90763f4d.zip
Let people install as non-root, but give them a bigass warning so they're
2001-07-13 Peter Williams <peterw@ximian.com> * Makefile.am (install-exec-local): Let people install as non-root, but give them a bigass warning so they're not allowed to complain when it doesn't work right. * camel-remote-store.c (sync_remote_folder): New function: hash table callback. (remote_disconnect): If cleanly disconnecting, sync our folders. Fixes deadlocks on exit (folders syncing after store disconnects) and also makes sense. svn path=/trunk/; revision=11090
Diffstat (limited to 'camel/camel-remote-store.c')
-rw-r--r--camel/camel-remote-store.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c
index 65445189fd..823a4673f4 100644
--- a/camel/camel-remote-store.c
+++ b/camel/camel-remote-store.c
@@ -281,6 +281,16 @@ remote_connect (CamelService *service, CamelException *ex)
return TRUE;
}
+
+static void
+sync_remote_folder (gpointer key, gpointer value, gpointer data)
+{
+ CamelFolder *folder = CAMEL_FOLDER (value);
+
+ if (!camel_exception_is_set ((CamelException *) data))
+ camel_folder_sync (folder, FALSE, (CamelException *) data);
+}
+
static gboolean
remote_disconnect (CamelService *service, gboolean clean, CamelException *ex)
{
@@ -292,6 +302,10 @@ remote_disconnect (CamelService *service, gboolean clean, CamelException *ex)
store->timeout_id = 0;
}
+ if (clean)
+ /* sync all folders */
+ g_hash_table_foreach (CAMEL_STORE (store)->folders, sync_remote_folder, ex);
+
if (!CAMEL_SERVICE_CLASS (store_class)->disconnect (service, clean, ex))
return FALSE;