From: Timo Sirainen Date: Tue, 2 Mar 2021 13:06:50 +0000 (+0200) Subject: lib: Clarify i[o]_stream_get_disconnect_reason() comment X-Git-Tag: 2.3.15~264 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=170505ce06da02d9f1664cbf8ccca1969389ca1d;p=thirdparty%2Fdovecot%2Fcore.git lib: Clarify i[o]_stream_get_disconnect_reason() comment --- diff --git a/src/lib/iostream.h b/src/lib/iostream.h index ac0b22148b..87bc37486b 100644 --- a/src/lib/iostream.h +++ b/src/lib/iostream.h @@ -1,7 +1,9 @@ #ifndef IOSTREAM_H #define IOSTREAM_H -/* Returns human-readable reason for why iostream was disconnected. */ +/* Returns human-readable reason for why iostream was disconnected. + The output is either "Connection closed" for clean disconnections or + "Connection closed: " for unclean disconnections. */ const char *io_stream_get_disconnect_reason(struct istream *input, struct ostream *output); diff --git a/src/lib/istream.h b/src/lib/istream.h index 04263ff1d6..2ea9601463 100644 --- a/src/lib/istream.h +++ b/src/lib/istream.h @@ -100,9 +100,11 @@ int i_stream_get_fd(struct istream *stream); /* Returns error string for the last error. It also returns "EOF" in case there is no error, but eof is set. Otherwise it returns "". */ const char *i_stream_get_error(struct istream *stream); -/* Returns human-readable reason for why istream was disconnected. This can be - called to log the error when i_stream_read() returns -1. If there's an error - the output is identical to i_stream_get_error(). */ +/* Returns human-readable reason for why istream was disconnected. + The output is either "Connection closed" for clean disconnections or + "Connection closed: " for unclean disconnections. This is an + alternative to i_stream_get_error(), which is preferred to be used when + logging errors about client connections. */ const char *i_stream_get_disconnect_reason(struct istream *stream); /* Mark the stream and all of its parent streams closed. Any reads after this