From 86ce105038275f8e32a4bcdd55ed4f1aa225615a Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 18 Sep 2020 02:49:32 +0200 Subject: refactor paging: introduce bsc_paging_start() Allow starting a paging from elsewhere than a BSSMAP Paging Request. For upcoming Location Services (LCS), a BSSLAP TA Request from the SMLC may require triggering a Paging. Change-Id: Iaff91584699d163bd1963927280ff3a8ddd43073 --- src/osmo-bsc/osmo_bsc_bssap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/osmo-bsc') diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 3c00d68a0..ad501222f 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -293,7 +293,6 @@ static int bssmap_handle_paging(struct bsc_msc_data *msc, .msc = msc, .tmsi = GSM_RESERVED_TMSI, }; - struct bsc_paging_params *params; // (tmp cosmetic shim, dropped in subsequent patch) tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0); remain = payload_length - 1; @@ -357,9 +356,13 @@ static int bssmap_handle_paging(struct bsc_msc_data *msc, LOG_PAGING(&paging, DMSC, LOGL_ERROR, "eMLPP IE present, but eMLPP is not handled\n"); } - rate_ctr_inc(&msc->network->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED]); + return bsc_paging_start(&paging); +} + +int bsc_paging_start(struct bsc_paging_params *params) +{ + rate_ctr_inc(&bsc_gsmnet->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED]); - params = &paging; switch (params->cil.id_discr) { case CELL_IDENT_NO_CELL: page_all_bts(params); -- cgit v1.2.3