From: Aki Tuomi Date: Thu, 9 Feb 2023 07:47:52 +0000 (+0200) Subject: lib: connection - Expose connection_update_counters() X-Git-Tag: 2.4.0~2933 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d47c741f54c572a1b045c4c9d0242efa6341560;p=thirdparty%2Fdovecot%2Fcore.git lib: connection - Expose connection_update_counters() --- diff --git a/src/lib/connection.c b/src/lib/connection.c index 1ffb0415af..7acf0a33b8 100644 --- a/src/lib/connection.c +++ b/src/lib/connection.c @@ -791,7 +791,7 @@ int connection_client_connect_async(struct connection *conn) return 0; } -static void connection_update_counters(struct connection *conn) +void connection_update_counters(struct connection *conn) { if (conn->input != NULL) event_add_int(conn->event, "bytes_in", conn->input->v_offset); diff --git a/src/lib/connection.h b/src/lib/connection.h index 1ed112f950..8318dbf83c 100644 --- a/src/lib/connection.h +++ b/src/lib/connection.h @@ -230,6 +230,9 @@ void connection_update_event(struct connection *conn); /* Update connection properties and labels */ void connection_update_properties(struct connection *conn); +/* Update byte counters in event */ +void connection_update_counters(struct connection *conn); + /* This needs to be called if the input/output streams are changed */ void connection_streams_changed(struct connection *conn);