aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/paging.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-19 16:20:28 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-19 16:20:28 +0800
commit7cb6867ea3fa61d738c7878b329c84e73949be3f (patch)
tree04a8285fc723e6c56aad5703997a279086457114 /openbsc/src/paging.c
parentd8138c43a1a8fc85f2783b442df7374f18a4ea36 (diff)
[vty] Count pending paging requests for the vty
Implement a method to count the number of pending paging requests per bts and print it on the VTY. This helps to see how big the backlog of requests is for a given BTS.
Diffstat (limited to 'openbsc/src/paging.c')
-rw-r--r--openbsc/src/paging.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/openbsc/src/paging.c b/openbsc/src/paging.c
index 9a4f3657b..f6cf1fd1d 100644
--- a/openbsc/src/paging.c
+++ b/openbsc/src/paging.c
@@ -326,3 +326,15 @@ void paging_update_buffer_space(struct gsm_bts *bts, u_int16_t free_slots)
{
bts->paging.available_slots = free_slots;
}
+
+unsigned int paging_pending_requests_nr(struct gsm_bts *bts)
+{
+ unsigned int requests = 0;
+
+ struct gsm_paging_request *req;
+
+ llist_for_each_entry(req, &bts->paging.pending_requests, entry)
+ ++requests;
+
+ return requests;
+}