dovecot-2.2: FETCH BINARY fix.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Aug 12 05:21:49 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/baa8fb155ddc
changeset: 14873:baa8fb155ddc
user: Timo Sirainen <tss at iki.fi>
date: Sun Aug 12 05:21:35 2012 +0300
description:
FETCH BINARY fix.
diffstat:
src/lib-storage/index/index-mail-binary.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 9f20f7bd992d -r baa8fb155ddc src/lib-storage/index/index-mail-binary.c
--- a/src/lib-storage/index/index-mail-binary.c Sun Aug 12 04:54:54 2012 +0300
+++ b/src/lib-storage/index/index-mail-binary.c Sun Aug 12 05:21:35 2012 +0300
@@ -89,6 +89,7 @@
struct istream *linput;
struct binary_block *block;
enum message_cte cte;
+ uoff_t part_end_offset;
int ret;
/* first parse the header to find c-t-e. */
@@ -146,6 +147,9 @@
}
ctx->copy_start_offset = part->physical_pos +
part->header_size.physical_size;
+ part_end_offset = part->physical_pos +
+ part->header_size.physical_size +
+ part->body_size.physical_size;
if (part->children != NULL) {
/* multipart */
@@ -153,9 +157,8 @@
if (add_binary_part(ctx, child, TRUE) < 0)
return -1;
}
- binary_copy_to(ctx, part->physical_pos +
- part->header_size.physical_size +
- part->body_size.physical_size);
+ binary_copy_to(ctx, part_end_offset);
+ ctx->copy_start_offset = part_end_offset;
return 0;
}
@@ -187,9 +190,7 @@
}
i_stream_unref(&linput);
- ctx->copy_start_offset = part->physical_pos +
- part->header_size.physical_size +
- part->body_size.physical_size;
+ ctx->copy_start_offset = part_end_offset;
return 0;
}
More information about the dovecot-cvs
mailing list