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
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index 9ae28e0..03c91fd 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -260,7 +260,7 @@
req, req->subscr->imsi);
/* must be destroyed before calling cbfn, to prevent double free */
- osmo_counter_inc(req->bts->network->stats.paging.expired);
+ rate_ctr_inc(&req->bts->network->ratectrs->ctr[MSC_CTR_PAGING_EXPIRED]);
cbfn_param = req->cbfn_param;
cbfn = req->cbfn;
@@ -330,7 +330,7 @@
struct gsm_bts *bts = NULL;
int num_pages = 0;
- osmo_counter_inc(network->stats.paging.attempted);
+ rate_ctr_inc(&network->ratectrs->ctr[MSC_CTR_PAGING_ATTEMPTED]);
/* start paging subscriber on all BTS within Location Area */
do {
@@ -349,7 +349,7 @@
} while (1);
if (num_pages == 0)
- osmo_counter_inc(network->stats.paging.detached);
+ rate_ctr_inc(&network->ratectrs->ctr[MSC_CTR_PAGING_DETACHED]);
return num_pages;
}