cron2 has uploaded a new patch set (#2) to the change originally created by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1533?usp=email )
The following approvals got outdated and were removed: Code-Review+2 by plaisthos Change subject: management: stop bytecount on client disconnection ...................................................................... management: stop bytecount on client disconnection When a management interface client requests periodic bytecount notifications, openvpn continues to emit them even after the client has disconnected. Additionally, upon reconnecting, the client starts receiving these notifications without having issued a new bytecount command. Stop the periodic bytecount operation when the management interface client disconnects, preventing unnecessary stats polling when using DCO and ensuring that clients only receive notifications they have explicitly requested. Change-Id: I6bdded6c70596b69428e6a00a405ac3cedc405fa Signed-off-by: Ralf Lici <[email protected]> Acked-by: Arne Schwabe <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1533 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg35825.html Signed-off-by: Gert Doering <[email protected]> (cherry-picked from fccdb21733d2826bcdc080fdfa93b0283b5231b8) --- M src/openvpn/manage.c 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/33/1533/2 diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 0e4afa2..3a2e84e 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -471,6 +471,13 @@ } static void +man_bytecount_stop(struct management *man) +{ + man->connection.bytecount_update_seconds = 0; + event_timeout_clear(&man->connection.bytecount_update_interval); +} + +static void man_bytecount(struct management *man, const int update_seconds) { if (update_seconds > 0) @@ -482,8 +489,7 @@ } else { - man->connection.bytecount_update_seconds = 0; - event_timeout_clear(&man->connection.bytecount_update_interval); + man_bytecount_stop(man); } msg(M_CLIENT, "SUCCESS: bytecount interval changed"); } @@ -1992,6 +1998,7 @@ { if (socket_defined(man->connection.sd_cli)) { + man_bytecount_stop(man); #ifdef _WIN32 man_stop_ne32(man); #endif -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1533?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I6bdded6c70596b69428e6a00a405ac3cedc405fa Gerrit-Change-Number: 1533 Gerrit-PatchSet: 2 Gerrit-Owner: ralf_lici <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
