mirror of
https://gerrit.osmocom.org/osmo-gbproxy
synced 2024-08-18 08:56:23 +00:00
[paging] Use paging_request_stop to stop all paging requests
This loop looks a lot like the one inside the paging code. Call it instead and change the code in paging_request_stop to cope with a NULL _bts.
This commit is contained in:
parent
c3131655df
commit
b78507a2e8
2 changed files with 4 additions and 11 deletions
|
@ -295,7 +295,8 @@ void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr,
|
|||
{
|
||||
struct gsm_bts *bts = NULL;
|
||||
|
||||
_paging_request_stop(_bts, subscr, lchan);
|
||||
if (_bts)
|
||||
_paging_request_stop(_bts, subscr, lchan);
|
||||
|
||||
do {
|
||||
/*
|
||||
|
@ -304,7 +305,7 @@ void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr,
|
|||
* location area of the _bts as reconfiguration of the
|
||||
* network is probably happening less often.
|
||||
*/
|
||||
bts = gsm_bts_by_lac(_bts->network, subscr->lac, bts);
|
||||
bts = gsm_bts_by_lac(subscr->net, subscr->lac, bts);
|
||||
if (!bts)
|
||||
break;
|
||||
|
||||
|
|
|
@ -102,15 +102,7 @@ void trans_free(struct gsm_trans *trans)
|
|||
|
||||
if (!trans->lchan && trans->subscr && trans->subscr->net) {
|
||||
/* Stop paging on all bts' */
|
||||
bts = NULL;
|
||||
do {
|
||||
bts = gsm_bts_by_lac(trans->subscr->net,
|
||||
trans->subscr->lac, bts);
|
||||
if (!bts)
|
||||
break;
|
||||
/* Stop paging */
|
||||
paging_request_stop(bts, trans->subscr, NULL);
|
||||
} while (1);
|
||||
paging_request_stop(NULL, trans->subscr, NULL);
|
||||
}
|
||||
|
||||
if (trans->subscr)
|
||||
|
|
Loading…
Reference in a new issue