aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-03-03 11:03:17 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-03-03 11:08:22 +0100
commit9b5192b153e51419f91d9b4092053b43e275371b (patch)
tree95fe85675ad290bd20989e36b88a9b0370cc382c
parentf4be327b4c716cffced11fa3cec3dca3c7c78986 (diff)
bsc: Stop "show paging" from crashing before the first paging
The paging structure is still initialized lazily and we attempt to traverse it before it is ready. The crash was discovered by Katerina. Removing the lazy initialization will take a bit of work as the gsm_data_shared is used by the osmo-bts and the OpenBSC but paging is different.
-rw-r--r--openbsc/src/libbsc/bsc_vty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index a59397f0c..cf4337073 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -1069,6 +1069,9 @@ static void bts_paging_dump_vty(struct vty *vty, struct gsm_bts *bts)
{
struct gsm_paging_request *pag;
+ if (!bts->paging.bts)
+ return;
+
llist_for_each_entry(pag, &bts->paging.pending_requests, entry)
paging_dump_vty(vty, pag);
}