aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_subscriber.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-28 22:12:30 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-06 14:52:52 +0100
commitebdd3cbd89c4dd1c2e724834e28107cb69473d8e (patch)
treecb0e60feb027a194e818df2248c537b4e97edde2 /openbsc/src/gsm_subscriber.c
parentffccb77df0b60574fb4c348793cb4ecdda5ebc94 (diff)
subscr: Show the number of pending requests on this subscriber.
Diffstat (limited to 'openbsc/src/gsm_subscriber.c')
-rw-r--r--openbsc/src/gsm_subscriber.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/src/gsm_subscriber.c b/openbsc/src/gsm_subscriber.c
index 13260216e..f42c68868 100644
--- a/openbsc/src/gsm_subscriber.c
+++ b/openbsc/src/gsm_subscriber.c
@@ -345,3 +345,14 @@ void subscr_update_from_db(struct gsm_subscriber *sub)
{
db_subscriber_update(sub);
}
+
+int subscr_pending_requests(struct gsm_subscriber *sub)
+{
+ struct subscr_request *req;
+ int pending = 0;
+
+ llist_for_each_entry(req, &sub->requests, entry)
+ pending += 1;
+
+ return pending;
+}