From 495b0dbd24627a9289e9bdb8ef2f80af6af3445f Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 4 Nov 2015 14:39:37 +0100 Subject: gprs-ns/stats: When the NSVCI is updated, update the stats counter The NS object is created with an unknown identity and only after the reset procedure has progressed (completed?) we know the real ID for this peer. Before nobody has looked at the idx values (this could have been seen with the CTRL interface) but with statsd the wrong NSVCI becomes obvious. Add routines to update the idx and I don't know if the change of idx is causing any issues but we will find that out soon. --- src/gb/gprs_ns.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index d0be754d..061fe589 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -886,6 +886,8 @@ static int gprs_ns_rx_reset(struct gprs_nsvc **nsvc, struct msgb *msg) (*nsvc)->nsei = nsei; (*nsvc)->nsvci = nsvci; (*nsvc)->nsvci_is_valid = 1; + rate_ctr_group_upd_idx((*nsvc)->ctrg, nsvci); + osmo_stat_item_group_udp_idx((*nsvc)->statg, nsvci); } /* inform interested parties about the fact that this NSVC -- cgit v1.2.3