summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-04 13:18:47 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-08 20:49:04 +0200
commitc9dbe3c7b1fef1a4132a2415d3e74a04591735c9 (patch)
tree01237a9361125a3902863a8c6e9fc9bb59150057
parent2f25764e51d7272a162d2b9f81d8124f6c1af76e (diff)
paging: Provide information about pending requests
For debugging it is nice to know how many requests are pending. Simply count it and print it besides the paging part.
-rw-r--r--openbsc/src/libmsc/vty_interface_layer3.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c
index 71fff93..f49c53a 100644
--- a/openbsc/src/libmsc/vty_interface_layer3.c
+++ b/openbsc/src/libmsc/vty_interface_layer3.c
@@ -58,8 +58,10 @@ extern struct gsm_network *gsmnet_from_vty(struct vty *v);
static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr)
{
int rc;
+ int reqs;
struct gsm_auth_info ainfo;
struct gsm_auth_tuple atuple;
+ struct llist_head *entry;
char expire_time[200];
vty_out(vty, " ID: %llu, Authorized: %d%s", subscr->id,
@@ -107,8 +109,12 @@ static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr)
"%a, %d %b %Y %T %z", localtime(&subscr->expire_lu));
expire_time[sizeof(expire_time) - 1] = '\0';
vty_out(vty, " Expiration Time: %s%s", expire_time, VTY_NEWLINE);
- vty_out(vty, " Paging: %s paging%s",
- subscr->is_paging ? "is" : "not", VTY_NEWLINE);
+
+ reqs = 0;
+ llist_for_each(entry, &subscr->requests)
+ reqs += 1;
+ vty_out(vty, " Paging: %s paging Requests: %d%s",
+ subscr->is_paging ? "is" : "not", reqs, VTY_NEWLINE);
vty_out(vty, " Use count: %u%s", subscr->use_count, VTY_NEWLINE);
}