aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-06-12 22:25:30 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-06-12 22:25:30 +0800
commit794da792b828a620bd234f382de7aa22b90447f2 (patch)
treecda038098a4043618d84611619bb01ca8b59a262 /camel/providers
parent170a2f7bb7e9362beb24d3b8f394b7ce04efaad1 (diff)
downloadgsoc2013-evolution-794da792b828a620bd234f382de7aa22b90447f2.tar.gz
gsoc2013-evolution-794da792b828a620bd234f382de7aa22b90447f2.tar.zst
gsoc2013-evolution-794da792b828a620bd234f382de7aa22b90447f2.zip
Don't bother with exists_changed. We don't need it afterall.
2004-06-12 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-summary.c (camel_imap4_summary_set_exists): Don't bother with exists_changed. We don't need it afterall. (camel_imap4_summary_flush_updates): Instead of updating flags if update_flags or exists_changed is set, only bother if update_flags is set or if exists is smaller than the summary count (since updating flags is also sueful for determining which messages have been removed). svn path=/trunk/; revision=26322
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap4/camel-imap4-summary.c12
-rw-r--r--camel/providers/imap4/camel-imap4-summary.h1
2 files changed, 4 insertions, 9 deletions
diff --git a/camel/providers/imap4/camel-imap4-summary.c b/camel/providers/imap4/camel-imap4-summary.c
index f5fec4d05e..ef08974572 100644
--- a/camel/providers/imap4/camel-imap4-summary.c
+++ b/camel/providers/imap4/camel-imap4-summary.c
@@ -107,7 +107,6 @@ camel_imap4_summary_init (CamelIMAP4Summary *summary, CamelIMAP4SummaryClass *kl
folder_summary->message_info_size = sizeof (CamelIMAP4MessageInfo);
summary->update_flags = TRUE;
- summary->exists_changed = FALSE;
summary->uidvalidity_changed = FALSE;
}
@@ -1010,11 +1009,7 @@ camel_imap4_summary_set_exists (CamelFolderSummary *summary, guint32 exists)
g_return_if_fail (CAMEL_IS_IMAP4_SUMMARY (summary));
- if (imap4_summary->exists == exists)
- return;
-
imap4_summary->exists = exists;
- imap4_summary->exists_changed = TRUE;
}
void
@@ -1131,14 +1126,14 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException *
g_return_val_if_fail (CAMEL_IS_IMAP4_SUMMARY (summary), -1);
engine = ((CamelIMAP4Store *) imap4_summary->folder->parent_store)->engine;
+ scount = camel_folder_summary_count (summary);
if (imap4_summary->uidvalidity_changed) {
first = 1;
- } else if (imap4_summary->update_flags || imap4_summary->exists_changed) {
+ } else if (imap4_summary->update_flags || imap4_summary->exists < scount) {
/* this both updates flags and removes messages which
* have since been expunged from the server by another
* client */
- scount = camel_folder_summary_count (summary);
ic = imap4_summary_fetch_flags (summary, 1, scount);
while ((id = camel_imap4_engine_iterate (engine)) < ic->id && id != -1)
@@ -1155,6 +1150,8 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException *
first = scount + 1;
camel_imap4_command_unref (ic);
+ } else {
+ first = scount;
}
if (first != 0 && imap4_summary->exists > 0) {
@@ -1178,7 +1175,6 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException *
}
imap4_summary->update_flags = FALSE;
- imap4_summary->exists_changed = FALSE;
imap4_summary->uidvalidity_changed = FALSE;
return 0;
diff --git a/camel/providers/imap4/camel-imap4-summary.h b/camel/providers/imap4/camel-imap4-summary.h
index 3bad898a6a..23218ff804 100644
--- a/camel/providers/imap4/camel-imap4-summary.h
+++ b/camel/providers/imap4/camel-imap4-summary.h
@@ -60,7 +60,6 @@ struct _CamelIMAP4Summary {
guint32 uidvalidity;
guint uidvalidity_changed:1;
- guint exists_changed:1;
guint update_flags:1;
};