aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_subscriber.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-29 11:07:22 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-06 14:52:52 +0100
commit763b42a92a7c60f931a9c7a3130f85c7080bee07 (patch)
tree4994783a1c4346316b9df36042d782e8ee1ce300 /openbsc/src/gsm_subscriber.c
parent68c3bf6de887463eb5bbc94594f28b22ab2f349f (diff)
subscr: Dump the pending requests to help with debugging state.
Diffstat (limited to 'openbsc/src/gsm_subscriber.c')
-rw-r--r--openbsc/src/gsm_subscriber.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/openbsc/src/gsm_subscriber.c b/openbsc/src/gsm_subscriber.c
index 9b8adebaa..2f6cc3ca9 100644
--- a/openbsc/src/gsm_subscriber.c
+++ b/openbsc/src/gsm_subscriber.c
@@ -28,6 +28,8 @@
#include <osmocore/talloc.h>
+#include <osmocom/vty/vty.h>
+
#include <openbsc/gsm_subscriber.h>
#include <openbsc/gsm_04_08.h>
#include <openbsc/debug.h>
@@ -387,3 +389,16 @@ int subscr_pending_clear(struct gsm_subscriber *sub)
return deleted;
}
+
+int subscr_pending_dump(struct gsm_subscriber *sub, struct vty *vty)
+{
+ struct subscr_request *req;
+
+ vty_out(vty, "Pending Requests for Subscriber %llu.%s", sub->id, VTY_NEWLINE);
+ llist_for_each_entry(req, &sub->requests, entry) {
+ vty_out(vty, "Channel type: %d State: %d Sub: %llu.%s",
+ req->channel_type, req->state, req->subscr->id, VTY_NEWLINE);
+ }
+
+ return 0;
+}