aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-30 15:05:43 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-02 17:06:46 +0100
commita5108ce78e12f0455aadbe25edf7a4aebc10a076 (patch)
tree45ab2e2da13b73de707f321b7b313e1dd2d72ea6
parent0a52db416c5343cf563f283f8a1223b11939e1a4 (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
-rw-r--r--openbsc/include/openbsc/gsm_subscriber.h2
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c6
-rw-r--r--openbsc/src/libmsc/gsm_subscriber.c3
3 files changed, 5 insertions, 6 deletions
diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h
index 48e369c74..e1bffd92d 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -34,7 +34,7 @@ enum gsm_subscriber_update_reason {
GSM_SUBSCRIBER_UPDATE_EQUIPMENT,
};
-int subscr_update(struct vlr_subscr *vsub, struct gsm_bts *bts, int reason);
+int subscr_update(struct vlr_subscr *vsub, int reason);
int subscr_update_expire_lu(struct vlr_subscr *vsub);
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index fc6d4691c..cd6f72b5a 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -275,7 +275,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 (send_tmsi == GSM_RESERVED_TMSI) {
/* we did not allocate a TMSI to the MS, so we need to
@@ -796,15 +796,13 @@ static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, s
break;
}
-
/* TODO? We used to remember the subscriber's classmark1 here and
* stored it in the old sqlite db, but now we store it in a conn that
* will be discarded anyway: */
conn->classmark.classmark1 = idi->classmark1;
if (vsub)
- subscr_update(vsub, conn->bts,
- GSM_SUBSCRIBER_UPDATE_DETACHED);
+ subscr_update(vsub, GSM_SUBSCRIBER_UPDATE_DETACHED);
else
DEBUGP(DMM, "Unknown Subscriber ?!?\n");
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index bbd1e39d8..2e9cc501f 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -238,9 +238,10 @@ int subscr_update_expire_lu(struct vlr_subscr *vsub)
return 0;
}
-int subscr_update(struct vlr_subscr *vsub, struct gsm_bts *bts, int reason)
+int subscr_update(struct vlr_subscr *vsub, int reason)
{
int rc = -EINVAL;
+ struct gsm_network *network = vsub->vlr->user_ctx;
/* FIXME: Migrate pending requests from one BSC to another */
switch (reason) {