[evolution-data-server] CamelIMAPXServer: Handle unsolicited VANISHED responses.



commit 07b7de2790baef043522d430d12d5da08a3bd162
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Aug 7 17:04:47 2013 +0200

    CamelIMAPXServer: Handle unsolicited VANISHED responses.
    
    By "unsolicited" here I mean there are no commands in progress which
    would otherwise emit the folder change notification when the command
    completes.  In that situation, emit the change notification directly
    from imapx_untagged_vanished() rather than holding it until the next
    command completes.

 camel/camel-imapx-server.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 00c9545..e3398ee 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -1620,6 +1620,15 @@ imapx_untagged_vanished (CamelIMAPXServer *is,
        uid_list = g_list_reverse (uid_list);
        camel_folder_summary_remove_uids (folder->summary, uid_list);
 
+       /* If the response is truly unsolicited (e.g. via NOTIFY)
+        * then go ahead and emit the change notification now. */
+       if (camel_imapx_command_queue_is_empty (is->queue)) {
+               camel_folder_summary_save_to_db (folder->summary, NULL);
+               imapx_update_store_summary (folder);
+               camel_folder_changed (folder, is->changes);
+               camel_folder_change_info_clear (is->changes);
+       }
+
        g_list_free_full (uid_list, (GDestroyNotify) g_free);
        g_ptr_array_free (uids, TRUE);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]