aboutsummaryrefslogtreecommitdiffstats
path: root/src/libvlr
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-05-07 14:13:55 +0200
committerOliver Smith <osmith@sysmocom.de>2019-05-15 10:57:43 +0200
commitb8077b0c1dcf76f7117bed9bb78c508d56df2386 (patch)
tree0d2e24e70f6e7ece09634b93c3e2f7cb626b5313 /src/libvlr
parentd103705f01435592dfe97ed33e1e2e3b93ac18fc (diff)
vlr: when setting IMEISV, also set IMEI
Copy IMEISV to IMEI when IMEISV changes. The additional SV digits will get cut off then. This is needed for the subscriber on demand use case, since we can get the IMEISV early (see [1]), but need to send the IMEI to the Check IMEI procedure. While adjusting the tests, I have noticed that there are code paths where we ask the MS for the IMEISV first, and later ask the MS for the IMEI, although we already have the IMEISV. This could be improved in a future patch. [1] Change-Id I256224194c3b8caf2b58a88d11dccd32c569201f Related: OS#2542 Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e
Diffstat (limited to 'src/libvlr')
-rw-r--r--src/libvlr/vlr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 508246989..f76a7ee01 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -451,6 +451,9 @@ void vlr_subscr_set_imeisv(struct vlr_subscr *vsub, const char *imeisv)
OSMO_STRLCPY_ARRAY(vsub->imeisv, imeisv);
DEBUGP(DVLR, "set IMEISV on subscriber; IMSI=%s IMEISV=%s\n",
vsub->imsi, vsub->imeisv);
+
+ /* Copy IMEISV to IMEI (additional SV digits get cut off) */
+ vlr_subscr_set_imei(vsub, imeisv);
}
/* Safely copy the given MSISDN string to vsub->msisdn */