summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-01 18:28:04 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-01 19:26:26 +0200
commit40407835b30d204a819772c4fd935e2ee71228b2 (patch)
tree48af3ee2066d0cd529001f16177d9c07cab06b90
parent067ce6dea5c9b8aacf9fdec8efc00de4924a7dfe (diff)
bsc: Change paging strategy based on override or not
Change the paging strategy based on on if a LAC override is in place or not. In case we had changed the LAC we need to page on all the BTS. Change the "grace" handling to iterate over the BTS and filter out all non matching ones LAC in case no LAC handling is active. Manually verified all four cases with a single BTS: * No LAC handling and grace period * LAC handling and grace period * No LAC handling and not lock * LAC handling and lock. Related: SYS#1398
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_grace.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
index 4fd0ebb..e6194ab 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
@@ -37,6 +37,16 @@ int bsc_grace_allow_new_connection(struct gsm_network *network, struct gsm_bts *
static int normal_paging(struct gsm_subscriber *subscr, int chan_needed,
struct osmo_msc_data *msc)
{
+ /* we can't page by lac.. we need to page everything */
+ if (msc->core_lac != -1) {
+ struct gsm_bts *bts;
+
+ llist_for_each_entry(bts, &msc->network->bts_list, list)
+ paging_request_bts(bts, subscr, chan_needed, NULL, msc);
+
+ return 0;
+ }
+
return paging_request(subscr->group->net, subscr, chan_needed, NULL,
msc);
}
@@ -50,22 +60,22 @@ static int locked_paging(struct gsm_subscriber *subscr, int chan_needed,
* Check if there is any BTS that is on for the given lac. Start
* with NULL and iterate through all bts.
*/
- do {
- bts = gsm_bts_by_lac(subscr->group->net, subscr->lac, bts);
- if (!bts)
- break;
-
+ llist_for_each_entry(bts, &msc->network->bts_list, list) {
/*
* continue if the BTS is not excluded from the lock
*/
if (!bts->excl_from_rf_lock)
continue;
+ /* in case of no lac patching is in place, check the BTS */
+ if (msc->core_lac == -1 && subscr->lac != bts->location_area_code)
+ continue;
+
/*
* now page on this bts
*/
paging_request_bts(bts, subscr, chan_needed, NULL, msc);
- } while (1);
+ };
/* All bts are either off or in the grace period */
return 0;