[evolution-data-server] CamelIMAPXStore: Obtain a fresh folder list on startup.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelIMAPXStore: Obtain a fresh folder list on startup.
- Date: Sat, 17 Aug 2013 13:48:28 +0000 (UTC)
commit b965eb3df23d3de8afb6585ac96aaa1b5c2238c5
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Aug 17 09:33:19 2013 -0400
CamelIMAPXStore: Obtain a fresh folder list on startup.
Unless we're offline, always obtain a fresh mailbox listing from the
IMAP server on startup. The result of get_folder_info_sync() should
always be as complete and accurate as possible.
camel/camel-imapx-store.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/camel/camel-imapx-store.c b/camel/camel-imapx-store.c
index f13f3a2..a90428f 100644
--- a/camel/camel-imapx-store.c
+++ b/camel/camel-imapx-store.c
@@ -1598,13 +1598,18 @@ imapx_store_get_folder_info_sync (CamelStore *store,
goto exit;
}
- if (camel_store_summary_count (store_summary) == 0)
+ if (imapx_store->priv->last_refresh_time == 0) {
+ imapx_store->priv->last_refresh_time = time (NULL);
initial_setup = TRUE;
+ }
if (!initial_setup && flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED) {
- time_t now = time (NULL);
+ time_t time_since_last_refresh;
+
+ time_since_last_refresh =
+ time (NULL) - imapx_store->priv->last_refresh_time;
- if (now - imapx_store->priv->last_refresh_time > FINFO_REFRESH_INTERVAL) {
+ if (time_since_last_refresh > FINFO_REFRESH_INTERVAL) {
CamelSession *session;
imapx_store->priv->last_refresh_time = time (NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]