changeset 18879:ac8fc3db0ef6

virtual: Added more asserts when DEBUG is enabled.
author Timo Sirainen <tss@iki.fi>
date Wed, 17 Jun 2015 14:24:06 +0300
parents 91d8f998bf83
children d609454bdf64
files src/plugins/virtual/virtual-sync.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);