dovecot-2.2: lib-imap-client: Improved error message a bit if se...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Feb 14 07:47:59 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/9ecf16e01a87
changeset: 18249:9ecf16e01a87
user: Timo Sirainen <tss at iki.fi>
date: Sat Feb 14 09:47:41 2015 +0200
description:
lib-imap-client: Improved error message a bit if server disconnects.
diffstat:
src/lib-imap-client/imapc-connection.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r 9bd6ed657cb3 -r 9ecf16e01a87 src/lib-imap-client/imapc-connection.c
--- a/src/lib-imap-client/imapc-connection.c Fri Feb 13 16:39:30 2015 +0200
+++ b/src/lib-imap-client/imapc-connection.c Sat Feb 14 09:47:41 2015 +0200
@@ -1300,15 +1300,17 @@
i_error("imapc(%s): Server disconnected with message: %s",
conn->name, conn->disconnect_reason);
} else if (conn->ssl_iostream == NULL) {
- i_error("imapc(%s): Server disconnected unexpectedly",
- conn->name);
+ errstr = conn->input->stream_errno == 0 ? "EOF" :
+ i_stream_get_error(conn->input);
+ i_error("imapc(%s): Server disconnected unexpectedly: %s",
+ conn->name, errstr);
} else {
errstr = ssl_iostream_get_last_error(conn->ssl_iostream);
if (errstr == NULL) {
errstr = conn->input->stream_errno == 0 ? "EOF" :
- strerror(conn->input->stream_errno);
+ i_stream_get_error(conn->input);
}
- i_error("imapc(%s): Server disconnected: %s",
+ i_error("imapc(%s): Server disconnected unexpectedly: %s",
conn->name, errstr);
}
imapc_connection_reconnect(conn);
More information about the dovecot-cvs
mailing list