Aggregate NSVC stats inside the NSE
Change-Id: Ifa3c85ec52bda14596e9d7a8705baa1fd4ee2010
Related: OS#4998
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 05118b2..4dc0536 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -230,7 +230,7 @@
osmo_timer_schedule(&priv->alive.timer, nsi->timeout[NS_TOUT_TNS_ALIVE], 0);
break;
case NS_TOUT_TNS_ALIVE:
- rate_ctr_inc(rate_ctr_group_get_ctr(priv->nsvc->ctrg, NS_CTR_LOST_ALIVE));
+ RATE_CTR_INC_NS(priv->nsvc, NS_CTR_LOST_ALIVE);
priv->alive.N++;
if (priv->alive.N <= nsi->timeout[NS_TOUT_TNS_ALIVE_RETRIES]) {
@@ -336,7 +336,7 @@
if (old_state != GPRS_NS2_ST_BLOCKED) {
priv->N = 0;
- rate_ctr_inc(rate_ctr_group_get_ctr(priv->nsvc->ctrg, NS_CTR_BLOCKED));
+ RATE_CTR_INC_NS(priv->nsvc, NS_CTR_BLOCKED);
}
ns2_nse_notify_unblocked(priv->nsvc, false);
@@ -412,7 +412,7 @@
struct gprs_ns2_nse *nse = nsvc->nse;
if (old_state != GPRS_NS2_ST_UNBLOCKED)
- rate_ctr_inc(rate_ctr_group_get_ctr(nsvc->ctrg, NS_CTR_UNBLOCKED));
+ RATE_CTR_INC_NS(nsvc, NS_CTR_UNBLOCKED);
priv->accept_unitdata = true;
ns2_nse_notify_unblocked(nsvc, true);
@@ -527,7 +527,7 @@
switch (fi->state) {
case GPRS_NS2_ST_RESET:
if (priv->initiate_reset) {
- rate_ctr_inc(rate_ctr_group_get_ctr(priv->nsvc->ctrg, NS_CTR_LOST_RESET));
+ RATE_CTR_INC_NS(priv->nsvc, NS_CTR_LOST_RESET);
priv->N++;
if (priv->N <= nsi->timeout[NS_TOUT_TNS_RESET_RETRIES]) {
osmo_fsm_inst_state_chg(fi, GPRS_NS2_ST_RESET, nsi->timeout[NS_TOUT_TNS_RESET], 0);