diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-06-24 11:29:55 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-07-30 16:34:33 +0200 |
commit | c3de9a62aa81e40b62b3dd19c15b724b0126821e (patch) | |
tree | cbecc9ab3254fab0d80d2052b71978c9ebd7f61f | |
parent | 08d5204f0c7d32531a49d5971fdf2e926d020f7b (diff) |
Store identity of VLR/SGSN in UpdateLocationlaforge/ussd
The HLR must store the least-recently used VLR and SGSN identities in
its database to ensure subsequent mobile-terminated transactions can
be routed accordingly.
Change-Id: Ib2611421f3638eadc361787af801fffe9a34bd8a
Closes: OS#2796
-rw-r--r-- | src/hlr.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -298,10 +298,19 @@ static int rx_upd_loc_req(struct osmo_gsup_conn *conn, } else #endif { + int rc; + uint8_t *addr; + rc = osmo_gsup_conn_ccm_get(conn, &addr, IPAC_IDTAG_SERNR); + if (rc <= 0) { + osmo_strlcpy(luop->subscr.imsi, gsup->imsi, sizeof(luop->subscr.imsi)); + lu_op_tx_error(luop, GMM_CAUSE_NET_FAIL); + return 0; + } /* TODO: Subscriber allowed to roam in PLMN? */ /* TODO: Update RoutingInfo */ /* TODO: Reset Flag MS Purged (cs/ps) */ /* TODO: Control_Tracing_HLR / Control_Tracing_HLR_with_SGSN */ + db_subscr_lu(g_hlr->dbc, luop->subscr.id, (char *)addr, luop->is_ps); lu_op_tx_insert_subscr_data(luop); } return 0; |