diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-06-13 01:27:51 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-13 01:27:51 +0800 |
commit | 3e94f5100cae141d1944b0c1cf9577a59a3ce281 (patch) | |
tree | ec7bba2ff1787abe6a6d3cd9163aba9d7709a648 | |
parent | 2f2db14aca26d6b60b67685a1bcbbe1500b09b01 (diff) | |
download | gsoc2013-evolution-3e94f5100cae141d1944b0c1cf9577a59a3ce281.tar.gz gsoc2013-evolution-3e94f5100cae141d1944b0c1cf9577a59a3ce281.tar.zst gsoc2013-evolution-3e94f5100cae141d1944b0c1cf9577a59a3ce281.zip |
Flush summary updates for the currently selected folder. (imap4_noop):
2004-06-12 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap4/camel-imap4-store.c (imap4_noop): Flush summary
updates for the currently selected folder.
(imap4_noop): Sync the currently selected folder before sending
NOOP.
svn path=/trunk/; revision=26324
-rw-r--r-- | camel/ChangeLog | 2 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-store.c | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 3fa2d5bfbd..402c331b9f 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -2,6 +2,8 @@ * providers/imap4/camel-imap4-store.c (imap4_noop): Flush summary updates for the currently selected folder. + (imap4_noop): Sync the currently selected folder before sending + NOOP. * providers/imap4/camel-imap4-summary.c (camel_imap4_summary_set_exists): Don't bother with diff --git a/camel/providers/imap4/camel-imap4-store.c b/camel/providers/imap4/camel-imap4-store.c index e9dcd66288..518b8ab137 100644 --- a/camel/providers/imap4/camel-imap4-store.c +++ b/camel/providers/imap4/camel-imap4-store.c @@ -1301,11 +1301,20 @@ static void imap4_noop (CamelStore *store, CamelException *ex) { CamelIMAP4Engine *engine = ((CamelIMAP4Store *) store)->engine; + CamelFolder *folder = (CamelFolder *) engine->folder; CamelIMAP4Command *ic; int id; CAMEL_SERVICE_LOCK (store, connect_lock); + if (folder) { + camel_folder_sync (folder, FALSE, ex); + if (camel_exception_is_set (ex)) { + CAMEL_SERVICE_UNLOCK (store, connect_lock); + return; + } + } + ic = camel_imap4_engine_queue (engine, NULL, "NOOP\r\n"); while ((id = camel_imap4_engine_iterate (engine)) < ic->id && id != -1) ; @@ -1315,8 +1324,8 @@ imap4_noop (CamelStore *store, CamelException *ex) camel_imap4_command_unref (ic); - if (engine->folder && !camel_exception_is_set (ex)) - camel_imap4_summary_flush_updates (((CamelFolder *) engine->folder)->summary, ex); + if (folder && !camel_exception_is_set (ex)) + camel_imap4_summary_flush_updates (folder->summary, ex); CAMEL_SERVICE_UNLOCK (store, connect_lock); } |