aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2011-03-06 10:24:51 +0100
committerJohannes Berg <johannes@sipsolutions.net>2011-03-06 10:24:51 +0100
commit4e74951f612263f40c07459e8a9304904c4421f2 (patch)
treedd62b09219cf6ace0a30bc3c4f6f46167b241dc4
parent65d997f8fe4c3786044dc79047dce5fc56facde5 (diff)
downloaddovecot-antispam-4e74951f612263f40c07459e8a9304904c4421f2.tar.gz
dovecot-antispam-4e74951f612263f40c07459e8a9304904c4421f2.tar.xz
dovecot-antispam-4e74951f612263f40c07459e8a9304904c4421f2.zip
fix spool2dir error handling bug
pointed out by Ron, thanks.
Diffstat (limited to '')
-rw-r--r--spool2dir.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/spool2dir.c b/spool2dir.c
index 2d9691b..59293d8 100644
--- a/spool2dir.c
+++ b/spool2dir.c
@@ -131,7 +131,7 @@ static int backend_handle_mail(struct mailbox_transaction_context *t,
{
struct istream *mailstream;
struct ostream *outstream;
- int ret;
+ int ret = -1;
const char *dest, *buf;
const unsigned char *beginning;
size_t size;
@@ -198,7 +198,6 @@ static int backend_handle_mail(struct mailbox_transaction_context *t,
if (i_stream_read_data(mailstream, &beginning, &size, 5) < 0 ||
size < 5) {
- ret = -1;
mail_storage_set_error(t->box->storage,
ME(NOTPOSSIBLE)
"Failed to read mail beginning");
@@ -210,7 +209,6 @@ static int backend_handle_mail(struct mailbox_transaction_context *t,
i_stream_read_next_line(mailstream);
if (o_stream_send_istream(outstream, mailstream) < 0) {
- ret = -1;
mail_storage_set_error(t->box->storage,
ME(NOTPOSSIBLE)
"Failed to copy to spool file");