director-connection.c (dovecot-2.3.16) | : | director-connection.c (dovecot-2.3.17) | ||
---|---|---|---|---|
skipping to change at line 191 | skipping to change at line 191 | |||
t_strarray_join(conn->cur_args, "\t")); | t_strarray_join(conn->cur_args, "\t")); | |||
va_end(args); | va_end(args); | |||
if (conn->host != NULL) | if (conn->host != NULL) | |||
conn->host->last_protocol_failure = ioloop_time; | conn->host->last_protocol_failure = ioloop_time; | |||
} | } | |||
static void | static void | |||
director_connection_append_stats(struct director_connection *conn, string_t *str ) | director_connection_append_stats(struct director_connection *conn, string_t *str ) | |||
{ | { | |||
int input_msecs = timeval_diff_msecs(&ioloop_timeval, &conn->last_input); | ||||
int output_msecs = timeval_diff_msecs(&ioloop_timeval, &conn->last_output | ||||
); | ||||
int connected_msecs = timeval_diff_msecs(&ioloop_timeval, &conn->connecte | ||||
d_time); | ||||
struct rusage usage; | struct rusage usage; | |||
str_printfa(str, "bytes in=%"PRIuUOFF_T", bytes out=%"PRIuUOFF_T, | str_printfa(str, "bytes in=%"PRIuUOFF_T", bytes out=%"PRIuUOFF_T, | |||
conn->input->v_offset, conn->output->offset); | conn->input->v_offset, conn->output->offset); | |||
str_printfa(str, ", %u+%u USERs received", | str_printfa(str, ", %u+%u USERs received", | |||
conn->handshake_users_received, conn->users_received); | conn->handshake_users_received, conn->users_received); | |||
if (conn->handshake_users_sent > 0) { | if (conn->handshake_users_sent > 0) { | |||
str_printfa(str, ", %u USERs sent in handshake", | str_printfa(str, ", %u USERs sent in handshake", | |||
conn->handshake_users_sent); | conn->handshake_users_sent); | |||
} | } | |||
if (conn->last_input.tv_sec > 0) { | if (conn->last_input.tv_sec > 0) { | |||
int input_msecs = timeval_diff_msecs(&ioloop_timeval, | ||||
&conn->last_input); | ||||
str_printfa(str, ", last input %u.%03u s ago", | str_printfa(str, ", last input %u.%03u s ago", | |||
input_msecs/1000, input_msecs%1000); | input_msecs/1000, input_msecs%1000); | |||
} | } | |||
if (conn->last_output.tv_sec > 0) { | if (conn->last_output.tv_sec > 0) { | |||
int output_msecs = timeval_diff_msecs(&ioloop_timeval, | ||||
&conn->last_output); | ||||
str_printfa(str, ", last output %u.%03u s ago", | str_printfa(str, ", last output %u.%03u s ago", | |||
output_msecs/1000, output_msecs%1000); | output_msecs/1000, output_msecs%1000); | |||
} | } | |||
if (conn->connected) { | if (conn->connected) { | |||
int connected_msecs = timeval_diff_msecs(&ioloop_timeval, | ||||
&conn->connected_time); | ||||
str_printfa(str, ", connected %u.%03u s ago", | str_printfa(str, ", connected %u.%03u s ago", | |||
connected_msecs/1000, connected_msecs%1000); | connected_msecs/1000, connected_msecs%1000); | |||
} | } | |||
if (o_stream_get_buffer_used_size(conn->output) > 0) { | if (o_stream_get_buffer_used_size(conn->output) > 0) { | |||
str_printfa(str, ", %zu bytes in output buffer", | str_printfa(str, ", %zu bytes in output buffer", | |||
o_stream_get_buffer_used_size(conn->output)); | o_stream_get_buffer_used_size(conn->output)); | |||
} | } | |||
str_printfa(str, ", %zu peak output buffer size", | str_printfa(str, ", %zu peak output buffer size", | |||
conn->peak_bytes_buffered); | conn->peak_bytes_buffered); | |||
if (conn->connected_user_cpu_set && | if (conn->connected_user_cpu_set && | |||
End of changes. 4 change blocks. | ||||
5 lines changed or deleted | 6 lines changed or added |