[dovecot-cvs]
dovecot/src/lib-storage/index/mbox istream-raw-mbox.c, 1.14, 1.15
cras at procontrol.fi
cras at procontrol.fi
Fri Jul 2 16:34:39 EEST 2004
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv19709/lib-storage/index/mbox
Modified Files:
istream-raw-mbox.c
Log Message:
body_offset wasn't set if mail had no header.
Index: istream-raw-mbox.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- istream-raw-mbox.c 29 Jun 2004 13:10:52 -0000 1.14
+++ istream-raw-mbox.c 2 Jul 2004 13:34:37 -0000 1.15
@@ -203,7 +203,9 @@
fromp = mbox_from; from_start_pos = 0;
eoh_char = rstream->body_offset == (uoff_t)-1 ? '\n' : '\0';
for (i = stream->pos; i < pos; i++) {
- if (buf[i] == eoh_char && i > 0 && buf[i-1] == '\n') {
+ if (buf[i] == eoh_char &&
+ ((i > 0 && buf[i-1] == '\n') ||
+ stream->istream.v_offset + i == rstream->hdr_offset)) {
rstream->body_offset = stream->istream.v_offset + i + 1;
eoh_char = '\0';
}
More information about the dovecot-cvs
mailing list