dovecot-2.2: virtual: Added more asserts when DEBUG is enabled.

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 17 11:28:31 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/ac8fc3db0ef6
changeset: 18879:ac8fc3db0ef6
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 17 14:24:06 2015 +0300
description:
virtual: Added more asserts when DEBUG is enabled.

diffstat:

 src/plugins/virtual/virtual-sync.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 91d8f998bf83 -r ac8fc3db0ef6 src/plugins/virtual/virtual-sync.c
--- a/src/plugins/virtual/virtual-sync.c	Wed Jun 17 14:23:38 2015 +0300
+++ b/src/plugins/virtual/virtual-sync.c	Wed Jun 17 14:24:06 2015 +0300
@@ -1583,6 +1583,14 @@
 		virtual_sync_new_backend_boxes(ctx);
 	}
 	ret = virtual_sync_backend_add_new(ctx);
+#ifdef DEBUG
+	for (i = 0; i < count; i++) {
+		const struct virtual_backend_uidmap *uidmap;
+
+		array_foreach(&bboxes[i]->uids, uidmap)
+			i_assert(uidmap->virtual_uid > 0);
+	}
+#endif
 	array_free(&ctx->all_adds);
 	if (array_is_created(&ctx->all_mails))
 		array_free(&ctx->all_mails);


More information about the dovecot-cvs mailing list