Mercurial > dovecot > core-2.2
changeset 22679:496ac7e7563f
director: Include number of users sent in handshake in disconnection log lines
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Sun, 26 Nov 2017 12:13:35 +0200 |
parents | ea5633b00934 |
children | 21e9717ba702 |
files | src/director/director-connection.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/director/director-connection.c Sun Nov 26 03:45:00 2017 +0200 +++ b/src/director/director-connection.c Sun Nov 26 12:13:35 2017 +0200 @@ -134,6 +134,7 @@ struct director_user_iter *user_iter; unsigned int users_received, handshake_users_received; + unsigned int handshake_users_sent; /* set during command execution */ const char *cur_cmd, *const *cur_args; @@ -191,6 +192,10 @@ conn->input->v_offset, conn->output->offset); str_printfa(str, ", %u+%u USERs received", conn->handshake_users_received, conn->users_received); + if (conn->handshake_users_sent > 0) { + str_printfa(str, ", %u USERs sent in handshake", + conn->handshake_users_sent); + } if (conn->last_input.tv_sec > 0) { str_printfa(str, ", last input %u.%03u s ago", input_msecs/1000, input_msecs%1000); @@ -2117,6 +2122,8 @@ if (user->weak) str_append(str, "\tw"); str_append_c(str, '\n'); + + conn->handshake_users_sent++; director_connection_send(conn, str_c(str)); if (++sent_count >= DIRECTOR_HANDSHAKE_MAX_USERS_SENT_PER_FLUSH) { /* Don't send too much at once to avoid hangs */