dovecot-2.0-sslstream: lmtp client: Fail immediately if server d...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:56:25 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/fed94dd1991b
changeset: 10333:fed94dd1991b
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 16 16:05:51 2009 -0500
description:
lmtp client: Fail immediately if server disconnects.

diffstat:

1 file changed, 5 insertions(+)
src/lib-lda/lmtp-client.c |    5 +++++

diffs (15 lines):

diff -r b5b253d35612 -r fed94dd1991b src/lib-lda/lmtp-client.c
--- a/src/lib-lda/lmtp-client.c	Mon Nov 16 14:40:59 2009 -0500
+++ b/src/lib-lda/lmtp-client.c	Mon Nov 16 16:05:51 2009 -0500
@@ -378,6 +378,11 @@ static void lmtp_client_input(struct lmt
 	if (client->input->stream_errno != 0) {
 		errno = client->input->stream_errno;
 		i_error("lmtp client: read() failed: %m");
+		lmtp_client_fail(client, ERRSTR_TEMP_REMOTE_FAILURE
+				 " (read failure)");
+	} else if (client->input->eof) {
+		lmtp_client_fail(client, ERRSTR_TEMP_REMOTE_FAILURE
+				 " (disconnected in input)");
 	}
 	lmtp_client_unref(&client);
 }


More information about the dovecot-cvs mailing list