export the 'trx_is_usable() function and use it from paging

this ensures we don't send paging requests to currently inactive transceivers.
This commit is contained in:
Harald Welte (local) 2009-12-28 16:36:28 +01:00 committed by Harald Welte
parent 1887f9d153
commit 82ff397e31
3 changed files with 8 additions and 1 deletions

View File

@ -61,4 +61,6 @@ struct pchan_load {
void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts);
void network_chan_load(struct pchan_load *pl, struct gsm_network *net);
int trx_is_usable(struct gsm_bts_trx *trx);
#endif /* _CHAN_ALLOC_H */

View File

@ -47,7 +47,7 @@ static int ts_is_usable(struct gsm_bts_trx_ts *ts)
return 1;
}
static int trx_is_usable(struct gsm_bts_trx *trx)
int trx_is_usable(struct gsm_bts_trx *trx)
{
/* FIXME: How does this behave for BS-11 ? */
if (is_ipaccess_bts(trx->bts)) {

View File

@ -265,6 +265,11 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr,
bts = gsm_bts_by_lac(network, subscr->lac, bts);
if (!bts)
break;
/* skip all currently inactive TRX */
if (!trx_is_usable(bts->c0))
continue;
num_pages++;
/* Trigger paging, pass any error to caller */