summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-08-28 23:10:40 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-08-29 02:31:00 +0300
commita9608e62e3a82b2d97f4c2594370dfeb217865c9 (patch)
tree36228236210d8fdedb89c3ccc3ffe17f5fdf6ef5
parentf8f17dc3083536dee2ea16e1d3ce1ee8cf0d2045 (diff)
downloadmailutils-a9608e62e3a82b2d97f4c2594370dfeb217865c9.tar.gz
mailutils-a9608e62e3a82b2d97f4c2594370dfeb217865c9.tar.bz2
Further bugfixes.
* libproto/mbox/mbox.c (_msg_stream_setup): Fix abridgement limits. (mbox_expunge_unlocked): Don't write extra newline after each message. * mailbox/stream.c (mu_stream_seek): ESPIPE does not constitute a permanent error.
-rw-r--r--libproto/mbox/mbox.c12
-rw-r--r--mailbox/stream.c2
2 files changed, 3 insertions, 11 deletions
diff --git a/libproto/mbox/mbox.c b/libproto/mbox/mbox.c
index 98d288d0b..c81701e50 100644
--- a/libproto/mbox/mbox.c
+++ b/libproto/mbox/mbox.c
@@ -298,7 +298,7 @@ _msg_stream_setup (mu_message_t msg, mbox_message_t mum)
status = mu_streamref_create_abridged (&stream,
mum->mud->mailbox->stream,
mum->envel_from_end,
- mum->body_end);
+ mum->body_end - 1);
if (status == 0)
status = mu_message_set_stream (msg, stream, mum);
return status;
@@ -1272,16 +1272,6 @@ mbox_expunge_unlocked (mu_mailbox_t mailbox, size_t dirty, int remove_deleted,
return status;
}
}
-
- status = mu_stream_write (tempstr, "\n", 1, NULL);
- if (status)
- {
- mu_error (_("%s:%d: error writing to temporary stream: %s"),
- __FILE__, __LINE__,
- mu_strerror (status));
- return status;
- }
-
}
/* Caution: before moving data back to the mailbox see
diff --git a/mailbox/stream.c b/mailbox/stream.c
index 95524ec6b..32db7c6c6 100644
--- a/mailbox/stream.c
+++ b/mailbox/stream.c
@@ -324,6 +324,8 @@ mu_stream_seek (mu_stream_t stream, mu_off_t offset, int whence,
if ((rc = _stream_flush_buffer (stream, 1)))
return rc;
rc = stream->seek (stream, offset, &stream->offset);
+ if (rc == ESPIPE)
+ return rc;
if (rc)
return _stream_seterror (stream, rc, 1);
_stream_cleareof (stream);

Return to:

Send suggestions and report system problems to the System administrator.