diff options
Diffstat (limited to 'openbsc/src/libbsc/paging.c')
-rw-r--r-- | openbsc/src/libbsc/paging.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c index 286c57ba9..6ce17f896 100644 --- a/openbsc/src/libbsc/paging.c +++ b/openbsc/src/libbsc/paging.c @@ -303,9 +303,23 @@ int paging_request_bts(struct gsm_bts *bts, struct gsm_subscriber *subscr, { int rc; + /* not the right network */ + if (bts->network_code != subscr->mnc || bts->country_code != subscr->mcc) { + LOGP(DPAG, LOGL_DEBUG, + "BTS(%d) is not of the right network mnc(%d/%d) mcc(%d/%d)\n", + bts->nr, + bts->network_code, subscr->mnc, + bts->country_code, subscr->mcc); + return 0; + } + /* skip all currently inactive TRX */ - if (!trx_is_usable(bts->c0)) + if (!trx_is_usable(bts->c0)) { + LOGP(DPAG, LOGL_DEBUG, + "BTS(%d) is not usable.\n", + bts->nr); return 0; + } /* maybe it is the first time we use it */ paging_init_if_needed(bts); @@ -393,6 +407,10 @@ void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr, if (!bts) break; + /* not the right network */ + if (bts->network_code != subscr->mnc || bts->country_code != subscr->mcc) + continue; + /* Stop paging */ if (bts != _bts) _paging_request_stop(bts, subscr, NULL, NULL); |