[dovecot-cvs] dovecot/src/imap cmd-status.c,1.26,1.26.2.1

tss at dovecot.org tss at dovecot.org
Wed Dec 20 20:13:06 UTC 2006


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv32332

Modified Files:
      Tag: branch_1_0
	cmd-status.c 
Log Message:
If STATUS command is done for a selected mailbox, don't sync it. This could
have caused lost EXPUNGEs among other lost replies..



Index: cmd-status.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-status.c,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -u -d -r1.26 -r1.26.2.1
--- cmd-status.c	14 Jan 2006 18:47:21 -0000	1.26
+++ cmd-status.c	20 Dec 2006 20:13:03 -0000	1.26.2.1
@@ -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)



More information about the dovecot-cvs mailing list