dissolve bsc_grace_paging_request()
RF-locking: simply ask bsc_grace_allow_new_connection() at the start of page_subscriber(). Before this patch, we would log an INFO of "Paging request failed" when RF-locked, for each BTS. Instead log "RF-locked". (An upcoming patch will introduce a LOG_PAGING() macro that will trivially add more log context there, so not bothering now.) Drop LAC condition: since Stefan introduced page_subscriber() starting 2018 Ic3c62ff0fccea586794ea4b3c275a0685cc9326e, matching a requested LAC to a specific BTS is done *before* calling page_subscriber(). BTW: the msc->core_lac (config 'core-location-area-code') has not had an effect on Paging maybe ever. I opened OS#4751. Change-Id: Ic8696414a1db8f4b1be502d6434599f684746ed6
This commit is contained in:
parent
f072fbad3e
commit
e60254118c
|
@ -27,10 +27,5 @@
|
|||
struct bsc_msc_data;
|
||||
|
||||
int bsc_grace_allow_new_connection(struct gsm_network *net, struct gsm_bts *bts);
|
||||
int bsc_grace_paging_request(enum signal_rf rf_policy,
|
||||
struct bsc_subscr *subscr,
|
||||
int chan_needed,
|
||||
struct bsc_msc_data *msc,
|
||||
struct gsm_bts *bts);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -121,6 +121,11 @@ page_subscriber(struct bsc_msc_data *msc, struct gsm_bts *bts,
|
|||
struct bsc_subscr *subscr;
|
||||
int ret;
|
||||
|
||||
if (!bsc_grace_allow_new_connection(bsc_gsmnet, bts)) {
|
||||
LOGP(DMSC, LOGL_DEBUG, "RF-locked: not paging on BTS %u\n", bts->nr);
|
||||
return;
|
||||
}
|
||||
|
||||
subscr = bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
|
||||
mi_string);
|
||||
|
||||
|
@ -138,7 +143,7 @@ page_subscriber(struct bsc_msc_data *msc, struct gsm_bts *bts,
|
|||
subscr->lac = lac;
|
||||
subscr->tmsi = tmsi;
|
||||
|
||||
ret = bsc_grace_paging_request(msc->network->rf_ctrl->policy, subscr, chan_needed, msc, bts);
|
||||
ret = paging_request_bts(bts, subscr, chan_needed, msc);
|
||||
if (ret == 0)
|
||||
LOGP(DMSC, LOGL_INFO, "Paging request failed or repeated paging: BTS: %d IMSI: '%s' TMSI: '0x%x/%u' LAC: 0x%x\n",
|
||||
bts->nr, mi_string, tmsi, tmsi, lac);
|
||||
|
|
|
@ -33,42 +33,3 @@ int bsc_grace_allow_new_connection(struct gsm_network *network, struct gsm_bts *
|
|||
return 1;
|
||||
return network->rf_ctrl->policy == S_RF_ON;
|
||||
}
|
||||
|
||||
|
||||
/* Return value is like paging_request_bts():
|
||||
* returns 1 on success (one BTS was paged); 0 in case of error (e.g. TRX down) */
|
||||
static int locked_paging_bts(struct gsm_bts *bts,
|
||||
struct bsc_subscr *subscr,
|
||||
int chan_needed,
|
||||
struct bsc_msc_data *msc)
|
||||
{
|
||||
/* Return error if the BTS is not excluded from the lock. */
|
||||
if (!bts->excl_from_rf_lock)
|
||||
return 0;
|
||||
|
||||
/* in case of no lac patching is in place, check the BTS */
|
||||
if (msc->core_lac == -1 && subscr->lac != bts->location_area_code)
|
||||
return 0;
|
||||
|
||||
return paging_request_bts(bts, subscr, chan_needed, msc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Page a subscriber in an MSC.
|
||||
* \param[in] rf_policy if not S_RF_ON, page only BTSs which are not excluded from the RF lock
|
||||
* \param[in] subscr subscriber we want to page
|
||||
* \param[in] chan_needed value of the GSM0808_IE_CHANNEL_NEEDED IE
|
||||
* \param[in] msc MSC which has issued this paging
|
||||
* \param[in] bts The BTS to issue the paging on
|
||||
* \returns 1 if paging was issued to the BTS, 0 if not
|
||||
*/
|
||||
int bsc_grace_paging_request(enum signal_rf rf_policy,
|
||||
struct bsc_subscr *subscr,
|
||||
int chan_needed,
|
||||
struct bsc_msc_data *msc,
|
||||
struct gsm_bts *bts)
|
||||
{
|
||||
if (rf_policy == S_RF_ON)
|
||||
return paging_request_bts(bts, subscr, chan_needed, msc);
|
||||
return locked_paging_bts(bts, subscr, chan_needed, msc);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue