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.
Showing
2 changed files
with
3 additions
and
11 deletions
... | @@ -298,7 +298,7 @@ _msg_stream_setup (mu_message_t msg, mbox_message_t mum) | ... | @@ -298,7 +298,7 @@ _msg_stream_setup (mu_message_t msg, mbox_message_t mum) |
298 | status = mu_streamref_create_abridged (&stream, | 298 | status = mu_streamref_create_abridged (&stream, |
299 | mum->mud->mailbox->stream, | 299 | mum->mud->mailbox->stream, |
300 | mum->envel_from_end, | 300 | mum->envel_from_end, |
301 | mum->body_end); | 301 | mum->body_end - 1); |
302 | if (status == 0) | 302 | if (status == 0) |
303 | status = mu_message_set_stream (msg, stream, mum); | 303 | status = mu_message_set_stream (msg, stream, mum); |
304 | return status; | 304 | return status; |
... | @@ -1272,16 +1272,6 @@ mbox_expunge_unlocked (mu_mailbox_t mailbox, size_t dirty, int remove_deleted, | ... | @@ -1272,16 +1272,6 @@ mbox_expunge_unlocked (mu_mailbox_t mailbox, size_t dirty, int remove_deleted, |
1272 | return status; | 1272 | return status; |
1273 | } | 1273 | } |
1274 | } | 1274 | } |
1275 | |||
1276 | status = mu_stream_write (tempstr, "\n", 1, NULL); | ||
1277 | if (status) | ||
1278 | { | ||
1279 | mu_error (_("%s:%d: error writing to temporary stream: %s"), | ||
1280 | __FILE__, __LINE__, | ||
1281 | mu_strerror (status)); | ||
1282 | return status; | ||
1283 | } | ||
1284 | |||
1285 | } | 1275 | } |
1286 | 1276 | ||
1287 | /* Caution: before moving data back to the mailbox see | 1277 | /* Caution: before moving data back to the mailbox see | ... | ... |
... | @@ -324,6 +324,8 @@ mu_stream_seek (mu_stream_t stream, mu_off_t offset, int whence, | ... | @@ -324,6 +324,8 @@ mu_stream_seek (mu_stream_t stream, mu_off_t offset, int whence, |
324 | if ((rc = _stream_flush_buffer (stream, 1))) | 324 | if ((rc = _stream_flush_buffer (stream, 1))) |
325 | return rc; | 325 | return rc; |
326 | rc = stream->seek (stream, offset, &stream->offset); | 326 | rc = stream->seek (stream, offset, &stream->offset); |
327 | if (rc == ESPIPE) | ||
328 | return rc; | ||
327 | if (rc) | 329 | if (rc) |
328 | return _stream_seterror (stream, rc, 1); | 330 | return _stream_seterror (stream, rc, 1); |
329 | _stream_cleareof (stream); | 331 | _stream_cleareof (stream); | ... | ... |
-
Please register or sign in to post a comment