(mbox_append_message0): Preserve return status from mu_stream_write, if it is not 0.
Showing
1 changed file
with
4 additions
and
4 deletions
... | @@ -1714,18 +1714,18 @@ mbox_append_message0 (mu_mailbox_t mailbox, mu_message_t msg, mu_off_t *psize, | ... | @@ -1714,18 +1714,18 @@ mbox_append_message0 (mu_mailbox_t mailbox, mu_message_t msg, mu_off_t *psize, |
1714 | return status; | 1714 | return status; |
1715 | } | 1715 | } |
1716 | status = mu_stream_write (mailbox->stream, buffer, nread, | 1716 | status = mu_stream_write (mailbox->stream, buffer, nread, |
1717 | *psize, &n); | 1717 | *psize, &n); |
1718 | if (status) | 1718 | if (status) |
1719 | break; | 1719 | break; |
1720 | mud->off += nread; | 1720 | mud->off += nread; |
1721 | *psize += n; | 1721 | *psize += n; |
1722 | } | 1722 | } |
1723 | while (nread > 0); | 1723 | while (nread > 0); |
1724 | n = 0; | ||
1725 | status = mu_stream_write (mailbox->stream, &nl, 1, *psize, &n); | ||
1726 | if (status) | 1724 | if (status) |
1727 | break; | 1725 | break; |
1728 | *psize += n; | 1726 | status = mu_stream_write (mailbox->stream, &nl, 1, *psize, &n); |
1727 | if (status == 0) | ||
1728 | *psize += n; | ||
1729 | } | 1729 | } |
1730 | 1730 | ||
1731 | default: | 1731 | default: | ... | ... |
-
Please register or sign in to post a comment