dovecot-2.2: lib-index: Don't write a broken transaction if exte...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 25 15:47:02 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/04c64300f81f
changeset: 16551:04c64300f81f
user: Timo Sirainen <tss at iki.fi>
date: Tue Jun 25 15:46:50 2013 +0300
description:
lib-index: Don't write a broken transaction if extension resize is done at first use.
diffstat:
src/lib-index/mail-index-transaction-export.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r a2555de348a7 -r 04c64300f81f src/lib-index/mail-index-transaction-export.c
--- a/src/lib-index/mail-index-transaction-export.c Tue Jun 25 02:23:02 2013 +0300
+++ b/src/lib-index/mail-index-transaction-export.c Tue Jun 25 15:46:50 2013 +0300
@@ -114,8 +114,12 @@
intro = &resizes[ext_id];
i_assert(intro->ext_id == idx || idx == (uint32_t)-1);
- intro->name_size = idx != (uint32_t)-1 ? 0 :
- strlen(rext->name);
+ if (idx != (uint32_t)-1)
+ intro->name_size = 0;
+ else {
+ intro->ext_id = (uint32_t)-1;
+ intro->name_size = strlen(rext->name);
+ }
buffer_append(buf, intro, sizeof(*intro));
} else {
/* generate a new intro structure */
More information about the dovecot-cvs
mailing list