dovecot-2.2: dsync: Fixed high data stack memory usage

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 24 15:19:12 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/ddf374a36057
changeset: 17261:ddf374a36057
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 24 18:18:42 2014 +0300
description:
dsync: Fixed high data stack memory usage

diffstat:

 src/doveadm/dsync/dsync-mailbox-import.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r aec6f57b8cf8 -r ddf374a36057 src/doveadm/dsync/dsync-mailbox-import.c
--- a/src/doveadm/dsync/dsync-mailbox-import.c	Thu Apr 24 13:49:25 2014 +0300
+++ b/src/doveadm/dsync/dsync-mailbox-import.c	Thu Apr 24 18:18:42 2014 +0300
@@ -557,9 +557,14 @@
 {
 	int ret;
 
-	while ((ret = importer_try_next_mail(importer, wanted_uid)) == 0 &&
-	       !importer->failed)
+	for (;;) {
+		T_BEGIN {
+			ret = importer_try_next_mail(importer, wanted_uid);
+		} T_END;
+		if (ret != 0 || importer->failed)
+			break;
 		importer->next_local_seq = importer->cur_mail->seq + 1;
+	}
 	return ret > 0;
 }
 


More information about the dovecot-cvs mailing list