dovecot-2.0: dbox: Fixed giving wrong map_uid_validity to new ma...

dovecot at dovecot.org dovecot at dovecot.org
Thu May 21 06:13:53 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/e902652ce4eb
changeset: 9340:e902652ce4eb
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 20 23:13:01 2009 -0400
description:
dbox: Fixed giving wrong map_uid_validity to new mailboxes.

diffstat:

1 file changed, 6 insertions(+)
src/lib-storage/index/dbox/dbox-map.c |    6 ++++++

diffs (16 lines):

diff -r 5ba40c164a2d -r e902652ce4eb src/lib-storage/index/dbox/dbox-map.c
--- a/src/lib-storage/index/dbox/dbox-map.c	Wed May 20 22:59:41 2009 -0400
+++ b/src/lib-storage/index/dbox/dbox-map.c	Wed May 20 23:13:01 2009 -0400
@@ -1156,6 +1156,12 @@ uint32_t dbox_map_get_uid_validity(struc
 	i_assert(map->view != NULL);
 
 	hdr = mail_index_get_header(map->view);
+	if (hdr->uid_validity != 0)
+		return hdr->uid_validity;
+
+	/* refresh index in case it was just changed */
+	(void)dbox_map_refresh(map);
+	hdr = mail_index_get_header(map->view);
 	return hdr->uid_validity != 0 ? hdr->uid_validity :
 		map->created_uid_validity;
 }


More information about the dovecot-cvs mailing list