[dovecot-cvs] dovecot/src/pop3 client.c,1.66.2.2,1.66.2.3

tss at dovecot.org tss at dovecot.org
Mon Feb 5 11:42:47 UTC 2007


Update of /var/lib/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv6738

Modified Files:
      Tag: branch_1_0
	client.c 
Log Message:
Commit the transaction even if client didn't QUIT so cached data gets saved.



Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.66.2.2
retrieving revision 1.66.2.3
diff -u -d -r1.66.2.2 -r1.66.2.3
--- client.c	28 Jan 2007 15:45:52 -0000	1.66.2.2
+++ client.c	5 Feb 2007 11:42:45 -0000	1.66.2.3
@@ -226,8 +226,12 @@
 		client->cmd(client);
 		i_assert(client->cmd == NULL);
 	}
-	if (client->trans != NULL)
-		mailbox_transaction_rollback(&client->trans);
+	if (client->trans != NULL) {
+		/* client didn't QUIT, but we still want to save any changes
+		   done in this transaction. especially the cached virtual
+		   message sizes. */
+		(void)mailbox_transaction_commit(&client->trans, 0);
+	}
 	if (client->mailbox != NULL)
 		mailbox_close(&client->mailbox);
 	mail_storage_destroy(&client->storage);



More information about the dovecot-cvs mailing list