From 9a3ced05ffeca49152e4f106e5f85818de785a53 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 26 Oct 2022 11:09:37 -0400 Subject: [PATCH] MT#55283 fix nopacket_relayed_sess stats This is a regression from the overhaul of the stats bookkeeping code. Change-Id: I9b7c2084fb20407e5a2a24fdf802b8fd6831dc75 --- daemon/statistics.c | 2 +- t/test-stats.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/statistics.c b/daemon/statistics.c index 0bce17ab7..a96d58f4d 100644 --- a/daemon/statistics.c +++ b/daemon/statistics.c @@ -154,7 +154,7 @@ void statistics_update_oneway(struct call* c) { } if (IS_OWN_CALL(c)) - RTPE_STATS_INC(nopacket_relayed_sess); + RTPE_STATS_ADD(nopacket_relayed_sess, total_nopacket_relayed_sess / 2); if (c->monologues.head) { ml = c->monologues.head->data; diff --git a/t/test-stats.c b/t/test-stats.c index 2bb23ef7c..d78a73cb4 100644 --- a/t/test-stats.c +++ b/t/test-stats.c @@ -6439,7 +6439,7 @@ int main(void) { "current_sessions_ipv4 0 200\n" "current_sessions_ipv6 0 200\n" "current_sessions_mixed 0 200\n" - "nopacket_relayed_sess 2 200\n" + "nopacket_relayed_sess 0 200\n" "oneway_stream_sess 0 200\n" "regular_term_sess 0 200\n" "relayed_errors_user 0 200\n" @@ -6627,8 +6627,8 @@ int main(void) { "0\n" "Total number of streams with no relayed packets\n" "zerowaystreams\n" - "2\n" - "2\n" + "0\n" + "0\n" "Total number of 1-way streams\n" "onewaystreams\n" "0\n"