diff options
author | Harald Welte <laforge@netfilter.org> | 2009-12-22 19:07:32 +0100 |
---|---|---|
committer | Harald Welte <laforge@netfilter.org> | 2009-12-22 20:42:40 +0100 |
commit | ffa55a4e8783419f60932ef2f9e872293cf932b9 (patch) | |
tree | c615771fe04a89807a012d8e100de53847b70d0f /openbsc/src/paging.c | |
parent | 4983921af1a84ea20c6be7944bf0ff4928578a69 (diff) |
statistics: Introduce 'struct counter' instead of using unsigned long
This has the advantage that counters can be added all over the code
very easily, while having only one routine that stores all of the
current counter values to the database. The counters are synced
every 60 seconds, providing relatively fine grained statistics
about the network usage as time passes by.
Diffstat (limited to 'openbsc/src/paging.c')
-rw-r--r-- | openbsc/src/paging.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/paging.c b/openbsc/src/paging.c index 538e0a8ec..820773a9e 100644 --- a/openbsc/src/paging.c +++ b/openbsc/src/paging.c @@ -212,7 +212,7 @@ static void paging_T3113_expired(void *data) cbfn = req->cbfn; paging_remove_request(&req->bts->paging, req); - req->bts->network->stats.paging.expired++; + counter_inc(req->bts->network->stats.paging.expired); dispatch_signal(SS_PAGING, S_PAGING_COMPLETED, &sig_data); if (cbfn) @@ -256,7 +256,7 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr, struct gsm_bts *bts = NULL; int num_pages = 0; - network->stats.paging.attempted++; + counter_inc(network->stats.paging.attempted); /* start paging subscriber on all BTS within Location Area */ do { @@ -274,7 +274,7 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr, } while (1); if (num_pages == 0) - network->stats.paging.detached++; + counter_inc(network->stats.paging.detached); return num_pages; } |