dovecot-2.2: mailbox_list_index=yes: Make sure storage error doe...

dovecot at dovecot.org dovecot at dovecot.org
Tue Aug 12 16:16:55 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/8948c0d91369
changeset: 17709:8948c0d91369
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 12 19:12:04 2014 +0300
description:
mailbox_list_index=yes: Make sure storage error doesn't change when updating STATUS info.

diffstat:

 src/lib-storage/list/mailbox-list-index-status.c |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r 3e461af4f0ff -r 8948c0d91369 src/lib-storage/list/mailbox-list-index-status.c
--- a/src/lib-storage/list/mailbox-list-index-status.c	Tue Aug 12 19:05:14 2014 +0300
+++ b/src/lib-storage/list/mailbox-list-index-status.c	Tue Aug 12 19:12:04 2014 +0300
@@ -515,7 +515,11 @@
 		return -1;
 	ctx = NULL;
 
+	/* it probably doesn't matter much here if we push/pop the error,
+	   but might as well do it. */
+	mail_storage_last_error_push(mailbox_get_storage(box));
 	(void)index_list_update_mailbox(box);
+	mail_storage_last_error_pop(mailbox_get_storage(box));
 	return 0;
 }
 
@@ -530,7 +534,12 @@
 		return -1;
 	t = NULL;
 
+	/* this transaction commit may have been done in error handling path
+	   and the caller still wants to access the current error. make sure
+	   that whatever we do here won't change the error. */
+	mail_storage_last_error_push(mailbox_get_storage(box));
 	(void)index_list_update_mailbox(box);
+	mail_storage_last_error_pop(mailbox_get_storage(box));
 	return 0;
 }
 


More information about the dovecot-cvs mailing list