Mercurial > dovecot > original-hg > dovecot-2.1
changeset 4940:76aa8a360c2f HEAD
If STATUS command is done for a selected mailbox, don't sync it. This could
have caused lost EXPUNGEs among other lost replies..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 20 Dec 2006 22:13:07 +0200 |
parents | ff2272c228cc |
children | f612d2086448 |
files | src/imap/cmd-status.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-status.c Wed Dec 20 21:23:43 2006 +0200 +++ b/src/imap/cmd-status.c Wed Dec 20 22:13:07 2006 +0200 @@ -50,7 +50,7 @@ struct mailbox_status *status) { struct mailbox *box; - bool failed; + bool failed = FALSE; if (client->mailbox != NULL && mailbox_equals(client->mailbox, storage, mailbox)) { @@ -63,11 +63,12 @@ MAILBOX_OPEN_KEEP_RECENT); if (box == NULL) return FALSE; + + if (imap_sync_nonselected(box, 0) < 0) + failed = TRUE; } - if (imap_sync_nonselected(box, 0) < 0) - failed = TRUE; - else + if (!failed) failed = mailbox_get_status(box, items, status) < 0; if (box != client->mailbox)