Mercurial > dovecot > core-2.2
changeset 19694:ef4bd9f4954c
imap: Removed special EXPUNGE callback for an Outlook workaround.
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.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 01 Feb 2016 20:26:19 +0200 |
parents | dacdabcd8085 |
children | 9ca924a62d0b |
files | src/imap/cmd-expunge.c |
diffstat | 1 files changed, 2 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-expunge.c Mon Feb 01 19:08:24 2016 +0200 +++ b/src/imap/cmd-expunge.c Mon Feb 01 20:26:19 2016 +0200 @@ -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 @@ } 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)