dovecot-1.3: lmtp: Minor cleanup.

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 17 01:12:36 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/a9f61b63dc3d
changeset: 9117:a9f61b63dc3d
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 16 18:09:36 2009 -0400
description:
lmtp: Minor cleanup.

diffstat:

1 file changed, 4 insertions(+), 5 deletions(-)
src/lda/main.c |    9 ++++-----

diffs (42 lines):

diff -r b1e9bb291e70 -r a9f61b63dc3d src/lda/main.c
--- a/src/lda/main.c	Wed Apr 15 20:24:53 2009 -0400
+++ b/src/lda/main.c	Thu Apr 16 18:09:36 2009 -0400
@@ -40,7 +40,7 @@
 #define MAIL_MAX_MEMORY_BUFFER (1024*128)
 
 static const char *wanted_headers[] = {
-	"From", "Message-ID", "Subject", "Return-Path",
+	"From", "To", "Message-ID", "Subject", "Return-Path",
 	NULL
 };
 
@@ -367,6 +367,7 @@ int main(int argc, char *argv[])
 	t = mailbox_transaction_begin(box, 0);
 	headers_ctx = mailbox_header_lookup_init(box, wanted_headers);
 	ctx.src_mail = mail_alloc(t, 0, headers_ctx);
+	mailbox_header_lookup_unref(&headers_ctx);
 	mail_set_seq(ctx.src_mail, 1);
 
 	if (ctx.dest_addr == NULL) {
@@ -377,11 +378,10 @@ int main(int argc, char *argv[])
 		}
 	}
 
-	ret = mail_deliver(&ctx, &storage);
-	if (ret < 0) {
+	if (mail_deliver(&ctx, &storage) < 0) {
 		if (storage == NULL) {
 			/* This shouldn't happen */
-			i_error("BUG: Saving failed for unknown storage");
+			i_error("BUG: Saving failed to unknown storage");
 			return EX_TEMPFAIL;
 		}
 
@@ -414,7 +414,6 @@ int main(int argc, char *argv[])
 	}
 
 	mail_free(&ctx.src_mail);
-	mailbox_header_lookup_unref(&headers_ctx);
 	mailbox_transaction_rollback(&t);
 	mailbox_close(&box);
 


More information about the dovecot-cvs mailing list