]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Send all pending tagged command replies before APPEND is started.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 28 Jan 2016 13:36:58 +0000 (15:36 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 28 Jan 2016 13:39:49 +0000 (15:39 +0200)
This probably doesn't matter a lot, but it's cleaner.

One side effect of this change is that if multiple APPENDs are pipelined
(without MULTIAPPEND) on the selected mailbox, this now performs a sync
between each APPEND and sends the EXISTS replies. This may be slightly
lower in performance, but it's also slightly more correct behavior.

src/imap/imap-commands.c

index 613098aabc947a22f8152d4e178cb8f8ff787f0f..397437510c73b504d7b4a101893c3f5400edf385 100644 (file)
@@ -20,7 +20,11 @@ static const struct command imap4rev1_commands[] = {
        { "LOGOUT",             cmd_logout,      COMMAND_FLAG_BREAKS_MAILBOX },
        { "NOOP",               cmd_noop,        COMMAND_FLAG_BREAKS_SEQS },
 
-       { "APPEND",             cmd_append,      COMMAND_FLAG_BREAKS_SEQS },
+       { "APPEND",             cmd_append,      COMMAND_FLAG_BREAKS_SEQS |
+                                                /* finish syncing and sending
+                                                   all tagged commands before
+                                                   we wait for APPEND input */
+                                                COMMAND_FLAG_BREAKS_MAILBOX },
        { "EXAMINE",            cmd_examine,     COMMAND_FLAG_BREAKS_MAILBOX },
        { "CREATE",             cmd_create,      0 },
        { "DELETE",             cmd_delete,      COMMAND_FLAG_BREAKS_MAILBOX |