aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_vc_fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gb/gprs_ns2_vc_fsm.c')
-rw-r--r--src/gb/gprs_ns2_vc_fsm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 7ed82997..341a5a1a 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -209,7 +209,7 @@ static void recv_test_procedure(struct osmo_fsm_inst *fi)
priv->alive.mode = NS_TOUT_TNS_TEST;
osmo_timer_schedule(&priv->alive.timer, nsi->timeout[NS_TOUT_TNS_TEST], 0);
- osmo_stat_item_set(nsvc->statg->items[NS_STAT_ALIVE_DELAY],
+ osmo_stat_item_set(osmo_stat_item_group_get_item(nsvc->statg, NS_STAT_ALIVE_DELAY),
alive_timer_elapsed_ms(priv));
}
@@ -229,7 +229,7 @@ static void alive_timeout_handler(void *data)
osmo_timer_schedule(&priv->alive.timer, nsi->timeout[NS_TOUT_TNS_ALIVE], 0);
break;
case NS_TOUT_TNS_ALIVE:
- rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_LOST_ALIVE]);
+ rate_ctr_inc(rate_ctr_group_get_ctr(priv->nsvc->ctrg, NS_CTR_LOST_ALIVE));
priv->alive.N++;
if (priv->alive.N <= nsi->timeout[NS_TOUT_TNS_ALIVE_RETRIES]) {
@@ -335,7 +335,7 @@ static void ns2_st_blocked_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
if (old_state != GPRS_NS2_ST_BLOCKED) {
priv->N = 0;
- rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_BLOCKED]);
+ rate_ctr_inc(rate_ctr_group_get_ctr(priv->nsvc->ctrg, NS_CTR_BLOCKED));
}
if (priv->om_blocked) {
@@ -410,7 +410,7 @@ static void ns2_st_unblocked_on_enter(struct osmo_fsm_inst *fi, uint32_t old_sta
struct gprs_ns2_nse *nse = nsvc->nse;
if (old_state != GPRS_NS2_ST_UNBLOCKED)
- rate_ctr_inc(&nsvc->ctrg->ctr[NS_CTR_UNBLOCKED]);
+ rate_ctr_inc(rate_ctr_group_get_ctr(nsvc->ctrg, NS_CTR_UNBLOCKED));
priv->accept_unitdata = true;
ns2_nse_notify_unblocked(nsvc, true);
@@ -525,7 +525,7 @@ static int ns2_vc_fsm_timer_cb(struct osmo_fsm_inst *fi)
switch (fi->state) {
case GPRS_NS2_ST_RESET:
if (priv->initiate_reset) {
- rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_LOST_RESET]);
+ rate_ctr_inc(rate_ctr_group_get_ctr(priv->nsvc->ctrg, 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);