]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Removed special EXPUNGE callback for an Outlook workaround.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 1 Feb 2016 18:26:19 +0000 (20:26 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 1 Feb 2016 18:26:19 +0000 (20:26 +0200)
As the comment mentions, this workaround isn't needed if index files are
used.  Hopefully also the Outlook bug itself is gone nowadays.. In any case
the current callback code didn't work, because it was returning FALSE and
causing an assert in a pipelined EXPUNGE+APPEND combination after 6e9454f:

Panic: file imap-client.c: line 862 (client_check_command_hangs): assertion
failed: (!have_wait_unfinished || unfinished_count > 0)

It would probably be possible to fix this, but it would complicate the code
even further, so it's easier just to get rid of this feature. It was easily
triggered by running imaptest stress testing.

src/imap/cmd-expunge.c

index 336be6174b3172573d0b3cb1c673fcc2782ce412..06589facbe439dd186b643928b9d4ec7fdccfd10 100644 (file)
@@ -5,20 +5,6 @@
 #include "imap-search-args.h"
 #include "imap-expunge.h"
 
-static bool cmd_expunge_callback(struct client_command_context *cmd)
-{
-       if (cmd->client->sync_seen_deletes && !cmd->uid) {
-               /* Outlook workaround: session 1 set \Deleted flag and
-                  session 2 tried to expunge without having seen it yet.
-                  expunge again. MAILBOX_TRANSACTION_FLAG_REFRESH should
-                  have caught this already if index files are used. */
-               return cmd_expunge(cmd);
-       }
-
-       client_send_tagline(cmd, "OK Expunge completed.");
-       return TRUE;
-}
-
 static bool ATTR_NULL(2)
 cmd_expunge_finish(struct client_command_context *cmd,
                   struct mail_search_args *search_args)
@@ -45,14 +31,8 @@ cmd_expunge_finish(struct client_command_context *cmd,
        }
 
        client->sync_seen_deletes = FALSE;
-       if ((client->enabled_features & MAILBOX_FEATURE_QRESYNC) != 0) {
-               return cmd_sync(cmd, MAILBOX_SYNC_FLAG_EXPUNGE,
-                               IMAP_SYNC_FLAG_SAFE, "OK Expunge completed.");
-       } else {
-               return cmd_sync_callback(cmd, MAILBOX_SYNC_FLAG_EXPUNGE,
-                                        IMAP_SYNC_FLAG_SAFE,
-                                        cmd_expunge_callback);
-       }
+       return cmd_sync(cmd, MAILBOX_SYNC_FLAG_EXPUNGE,
+                       IMAP_SYNC_FLAG_SAFE, "OK Expunge completed.");
 }
 
 bool cmd_uid_expunge(struct client_command_context *cmd)