dovecot-2.2: connection: connection_disconnect_reason() didn't h...

dovecot at dovecot.org dovecot at dovecot.org
Tue Aug 14 10:02:20 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/3d53028cbe9c
changeset: 14901:3d53028cbe9c
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 14 10:02:14 2012 +0300
description:
connection: connection_disconnect_reason() didn't handle non-errors correctly.

diffstat:

 src/lib/connection.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 87e14707d210 -r 3d53028cbe9c src/lib/connection.c
--- a/src/lib/connection.c	Tue Aug 14 06:22:44 2012 +0300
+++ b/src/lib/connection.c	Tue Aug 14 10:02:14 2012 +0300
@@ -284,6 +284,8 @@
 		errno = conn->input->stream_errno;
 	else if (conn->output != NULL && conn->output->stream_errno != 0)
 		errno = conn->output->stream_errno;
+	else
+		errno = 0;
 
 	return errno == 0 || errno == EPIPE ? "Connection closed" :
 		t_strdup_printf("Connection closed: %m");


More information about the dovecot-cvs mailing list