Mercurial > dovecot > original-hg > dovecot-1.2
diff src/imap/cmd-append.c @ 6454:b5e6543b4385 HEAD
Make sure we do a mailbox sync after flag updates (STORE, FETCH). Also added
a new IMAP_SYNC_FLAG_SAFE which is used to figure out if appends and
expunges are safe to send to client when delay-newmail workaround is
enabled.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 22 Sep 2007 13:55:36 +0300 |
parents | 65c69a53a7be |
children | 1a3604c8ee05 |
line wrap: on
line diff
--- a/src/imap/cmd-append.c Sat Sep 22 13:45:14 2007 +0300 +++ b/src/imap/cmd-append.c Sat Sep 22 13:55:36 2007 +0300 @@ -235,6 +235,7 @@ if (args->type == IMAP_ARG_EOL) { /* last message */ enum mailbox_sync_flags sync_flags; + enum imap_sync_flags imap_flags; uint32_t uid_validity, uid1, uid2; const char *msg; @@ -267,11 +268,16 @@ uid_validity, uid1, uid2); } - sync_flags = ctx->box == cmd->client->mailbox ? - 0 : MAILBOX_SYNC_FLAG_FAST; + if (ctx->box == cmd->client->mailbox) { + sync_flags = 0; + imap_flags = IMAP_SYNC_FLAG_SAFE; + } else { + sync_flags = MAILBOX_SYNC_FLAG_FAST; + imap_flags = 0; + } cmd_append_finish(ctx); - return cmd_sync(cmd, sync_flags, 0, msg); + return cmd_sync(cmd, sync_flags, imap_flags, msg); } if (!validate_args(args, &flags_list, &internal_date_str,