# HG changeset patch # User Timo Sirainen # Date 1511691215 -7200 # Node ID 496ac7e7563f7ddecf9ac8f3b533cb5d42d23864 # Parent ea5633b009341eb9ff9ba853260ee032ec6661e5 director: Include number of users sent in handshake in disconnection log lines diff -r ea5633b00934 -r 496ac7e7563f src/director/director-connection.c --- 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 */