From: Timo Sirainen Date: Sat, 25 Nov 2017 21:28:12 +0000 (+0200) Subject: director: Include number of USERs received in disconnection log lines X-Git-Tag: 2.2.34~212 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a03f855192a8bd76487b1be1517bd84515c91ab5;p=thirdparty%2Fdovecot%2Fcore.git director: Include number of USERs received in disconnection log lines Separate handshake and refresh USERs. --- diff --git a/src/director/director-connection.c b/src/director/director-connection.c index 1063ec24a4..d81a077ce6 100644 --- a/src/director/director-connection.c +++ b/src/director/director-connection.c @@ -133,6 +133,7 @@ struct director_connection { struct timeout *to_disconnect, *to_ping, *to_pong; struct director_user_iter *user_iter; + unsigned int users_received, handshake_users_received; /* set during command execution */ const char *cur_cmd, *const *cur_args; @@ -188,6 +189,8 @@ director_connection_append_stats(struct director_connection *conn, string_t *str str_printfa(str, "bytes in=%"PRIuUOFF_T", bytes out=%"PRIuUOFF_T, conn->input->v_offset, conn->output->offset); + str_printfa(str, ", %u+%u USERs received", + conn->handshake_users_received, conn->users_received); if (conn->last_input.tv_sec > 0) { str_printfa(str, ", last input %u.%03u s ago", input_msecs/1000, input_msecs%1000); @@ -764,6 +767,7 @@ director_handshake_cmd_user(struct director_connection *conn, return FALSE; } weak = args[3] != NULL && args[3][0] == 'w'; + conn->handshake_users_received++; host = mail_host_lookup(conn->dir->mail_hosts, &ip); if (host == NULL) { @@ -822,6 +826,7 @@ director_cmd_user(struct director_connection *conn, return FALSE; } + conn->users_received++; host = mail_host_lookup(conn->dir->mail_hosts, &ip); if (host == NULL) { /* we probably just removed this host. */