summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/gsm_04_08.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-30 15:05:43 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-11-12 15:50:37 +0100
commitc93ac1700dc8ebae0b2ae9fffe9f43d8e8618e3f (patch)
treeb6387ac3d7caf49075cb307df12defa8f6c69c5a /openbsc/src/libmsc/gsm_04_08.c
parent495518f4a9d5dbb63809ffbaa775e8d99330caee (diff)
gsm_04_08, gsm_subscriber: decouple lac from bts
The idea is to not have a direct pointer to a bts struct (into BSC land), but a LAC to resolve the BSC or RNC depending on the appropriate A or IuCS interface. subscr_update(): remove bts arg, add lac arg. Pass conn->lac to gsm48_generate_lai() instead of bts->location_area_code. Change-Id: I9f2b298a785bf4b2a1b3fcdd91b8256106b2d9de
Diffstat (limited to 'openbsc/src/libmsc/gsm_04_08.c')
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 2ce4da586..6b9491929 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -326,8 +326,7 @@ static int finish_lu(struct gsm_subscriber_connection *conn)
/* call subscr_update after putting the loc_upd_acc
* in the transmit queue, since S_SUBSCR_ATTACHED might
* trigger further action like SMS delivery */
- subscr_update(conn->subscr, conn->bts,
- GSM_SUBSCRIBER_UPDATE_ATTACHED);
+ subscr_update(conn->subscr, conn->lac, GSM_SUBSCRIBER_UPDATE_ATTACHED);
/*
* The gsm0408_loc_upd_acc sends a MI with the TMSI. The
@@ -473,7 +472,7 @@ static int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn)
lai = (struct gsm48_loc_area_id *) msgb_put(msg, sizeof(*lai));
gsm48_generate_lai(lai, conn->network->country_code,
conn->network->network_code,
- conn->bts->location_area_code);
+ conn->lac);
if (conn->subscr->tmsi == GSM_RESERVED_TMSI) {
uint8_t mi[10];
@@ -890,8 +889,7 @@ static void implit_attach(struct gsm_subscriber_connection *conn)
if (conn->subscr->lac != GSM_LAC_RESERVED_DETACHED)
return;
- subscr_update(conn->subscr, conn->bts,
- GSM_SUBSCRIBER_UPDATE_ATTACHED);
+ subscr_update(conn->subscr, conn->lac, GSM_SUBSCRIBER_UPDATE_ATTACHED);
}
@@ -1060,7 +1058,7 @@ static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, s
}
if (subscr) {
- subscr_update(subscr, conn->bts,
+ subscr_update(subscr, conn->lac,
GSM_SUBSCRIBER_UPDATE_DETACHED);
DEBUGP(DMM, "Subscriber: %s\n", subscr_name(subscr));