aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_filter.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_filter.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
index 596bfbdc1..58a57cdea 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
@@ -311,6 +311,19 @@ static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn,
return 0;
}
+static int has_core_identity(struct osmo_msc_data *msc)
+{
+ if (msc->core_ncc != -1)
+ return 1;
+ if (msc->core_mcc != -1)
+ return 1;
+ if (msc->core_lac != -1)
+ return 1;
+ if (msc->core_ci != -1)
+ return 1;
+ return 0;
+}
+
/**
* Messages coming back from the MSC.
*/
@@ -336,7 +349,7 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
msc = conn->sccp_con->msc;
if (mtype == GSM48_MT_MM_LOC_UPD_ACCEPT) {
- if (msc->core_ncc != -1 || msc->core_mcc != -1) {
+ if (has_core_identity(msc)) {
if (msgb_l3len(msg) >= sizeof(*gh) + sizeof(*lai)) {
lai = (struct gsm48_loc_area_id *) &gh->data[0];
gsm48_generate_lai(lai, net->country_code,