diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-07-12 15:42:02 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-08-27 01:58:19 +0000 |
commit | 20423ea6cfdecd264b32c7fe5e15ee7de4455692 (patch) | |
tree | e62843a1ddcb0fc97891be516d57df4565de1447 /openbsc/src/libbsc/abis_rsl.c | |
parent | 4e699a9cbf418518265dc7b8b6b7fe250d87222d (diff) |
libbsc/libmsc: convert old osmo counter into rate_ctrgs
rate counters support the export to statsd and can have a delta value.
Change-Id: Ie749cebd53a0bb618d0e23d375885712078bf8dd
Diffstat (limited to 'openbsc/src/libbsc/abis_rsl.c')
-rw-r--r-- | openbsc/src/libbsc/abis_rsl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index b84a0b582..092ec4ebc 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -1207,7 +1207,7 @@ static int rsl_rx_conn_fail(struct msgb *msg) TLVP_LEN(&tp, RSL_IE_CAUSE)); LOGPC(DRSL, LOGL_NOTICE, "\n"); - osmo_counter_inc(msg->lchan->ts->trx->bts->network->stats.chan.rf_fail); + rate_ctr_inc(&msg->lchan->ts->trx->bts->network->ratectrs->ctr[MSC_CTR_CHAN_RF_FAIL]); return rsl_rf_chan_release_err(msg->lchan); } @@ -1641,7 +1641,7 @@ static int rsl_rx_chan_rqd(struct msgb *msg) lctype = get_ctype_by_chreq(bts->network, rqd_ref->ra); chreq_reason = get_reason_by_chreq(rqd_ref->ra, bts->network->neci); - osmo_counter_inc(bts->network->stats.chreq.total); + rate_ctr_inc(&bts->network->ratectrs->ctr[MSC_CTR_CHREQ_TOTAL]); /* * We want LOCATION UPDATES to succeed and will assign a TCH @@ -1654,7 +1654,7 @@ static int rsl_rx_chan_rqd(struct msgb *msg) if (!lchan) { LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s 0x%x\n", msg->lchan->ts->trx->bts->nr, gsm_lchant_name(lctype), rqd_ref->ra); - osmo_counter_inc(bts->network->stats.chreq.no_channel); + rate_ctr_inc(&bts->network->ratectrs->ctr[MSC_CTR_CHREQ_NO_CHANNEL]); /* FIXME gather multiple CHAN RQD and reject up to 4 at the same time */ if (bts->network->T3122) rsl_send_imm_ass_rej(bts, 1, rqd_ref, bts->network->T3122 & 0xff); @@ -1837,7 +1837,7 @@ static int rsl_rx_rll_err_ind(struct msgb *msg) rll_indication(msg->lchan, rllh->link_id, BSC_RLLR_IND_ERR_IND); if (rlm_cause == RLL_CAUSE_T200_EXPIRED) { - osmo_counter_inc(msg->lchan->ts->trx->bts->network->stats.chan.rll_err); + rate_ctr_inc(&msg->lchan->ts->trx->bts->network->ratectrs->ctr[MSC_CTR_CHAN_RLL_ERR]); return rsl_rf_chan_release_err(msg->lchan); } |