summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-03 11:20:31 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-03 11:52:17 +0200
commit6b38d012fbe782b2c6194aadc8bf54a19ec75244 (patch)
treeacea245209e50d30fb7d535f8e52dd441baba16f
parent48690861431c25ffc031f8cca87de728e7976644 (diff)
paging: Go through all BTS to stop paging
As the comment says we should not rely that the paging occurs on the current LAC. We might page at more BTS. Walk all the BTS to stop paging. No callbacks will be issued by this stop operation.
-rw-r--r--openbsc/src/libbsc/paging.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index 6b46c6dfc..9ae28e0c4 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -391,28 +391,21 @@ void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr,
struct gsm_subscriber_connection *conn,
struct msgb *msg)
{
- struct gsm_bts *bts = NULL;
+ struct gsm_bts *bts;
log_set_context(BSC_CTX_SUBSCR, subscr);
+ /* Stop this first and dispatch the request */
if (_bts)
_paging_request_stop(_bts, subscr, conn, msg);
- do {
- /*
- * FIXME: Don't use the lac of the subscriber...
- * as it might have magically changed the lac.. use the
- * location area of the _bts as reconfiguration of the
- * network is probably happening less often.
- */
- bts = gsm_bts_by_lac(subscr->group->net, subscr->lac, bts);
- if (!bts)
- break;
-
- /* Stop paging */
- if (bts != _bts)
- _paging_request_stop(bts, subscr, NULL, NULL);
- } while (1);
+ /* Make sure to cancel this everywhere else */
+ llist_for_each_entry(bts, &subscr->group->net->bts_list, list) {
+ /* Sort of an optimization. */
+ if (bts == _bts)
+ continue;
+ _paging_request_stop(bts, subscr, NULL, NULL);
+ }
}
void paging_update_buffer_space(struct gsm_bts *bts, uint16_t free_slots)