dovecot: mail_index_map_move_to_memory() lost header extensions.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Aug 7 14:23:16 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/01d09f75af4a
changeset: 6221:01d09f75af4a
user: Timo Sirainen <tss at iki.fi>
date: Tue Aug 07 14:16:06 2007 +0300
description:
mail_index_map_move_to_memory() lost header extensions.
diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
src/lib-index/mail-index-map.c | 8 ++++++--
diffs (26 lines):
diff -r c14b923977e5 -r 01d09f75af4a src/lib-index/mail-index-map.c
--- a/src/lib-index/mail-index-map.c Tue Aug 07 13:56:33 2007 +0300
+++ b/src/lib-index/mail-index-map.c Tue Aug 07 14:16:06 2007 +0300
@@ -864,9 +864,12 @@ static void mail_index_map_copy_header(s
/* use src->hdr copy directly, because if we got here
from syncing it has the latest changes. */
dest->hdr = src->hdr;
- if (dest->hdr_copy_buf != NULL)
+ if (dest->hdr_copy_buf != NULL) {
+ if (src == dest)
+ return;
+
buffer_set_used_size(dest->hdr_copy_buf, 0);
- else {
+ } else {
dest->hdr_copy_buf =
buffer_create_dynamic(default_pool,
dest->hdr.header_size);
@@ -880,6 +883,7 @@ static void mail_index_map_copy_header(s
src->hdr.header_size - src->hdr.base_header_size);
}
dest->hdr_base = buffer_get_modifiable_data(dest->hdr_copy_buf, NULL);
+ i_assert(dest->hdr_copy_buf->used == dest->hdr.header_size);
}
static struct mail_index_record_map *
More information about the dovecot-cvs
mailing list