From 9b5192b153e51419f91d9b4092053b43e275371b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 3 Mar 2013 11:03:17 +0100 Subject: [PATCH] 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. --- openbsc/src/libbsc/bsc_vty.c | 3 +++ 1 file changed, 3 insertions(+) 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); }