aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_08.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-06-07 17:56:32 +0200
committerHarald Welte <laforge@gnumonks.org>2010-06-07 17:56:32 +0200
commitf5f512cc5945d069b3ffdea1fba6da5ab35bdfac (patch)
tree727461bc8a82991e3c07a01fd4da32698bd38790 /openbsc/src/gsm_04_08.c
parent7f573d566816a85f7589ae882f4f63c22a59c880 (diff)
GSM 04.08: Improve IMEI recording in hlr.sqlite3 for rejected subscribers
If we send the IDENTITY REQUEST for IMEI before sending the IDENTITY REQUEST for IMSI, the probability is higher that we receive the IMEI response and associate it with the respective subscriber.
Diffstat (limited to 'openbsc/src/gsm_04_08.c')
-rw-r--r--openbsc/src/gsm_04_08.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 06e19ac0a..b17e1da07 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -389,10 +389,6 @@ static int mm_rx_loc_upd_req(struct msgb *msg)
break;
case GSM_MI_TYPE_TMSI:
DEBUGPC(DMM, "\n");
- /* we always want the IMEI, too */
- rc = mm_tx_identity_req(lchan, GSM_MI_TYPE_IMEI);
- conn->loc_operation->waiting_for_imei = 1;
-
/* look up the subscriber based on TMSI, request IMSI if it fails */
subscr = subscr_get_by_tmsi(bts->network,
tmsi_from_string(mi_string));
@@ -401,6 +397,9 @@ static int mm_rx_loc_upd_req(struct msgb *msg)
rc = mm_tx_identity_req(lchan, GSM_MI_TYPE_IMSI);
conn->loc_operation->waiting_for_imsi = 1;
}
+ /* we always want the IMEI, too */
+ rc = mm_tx_identity_req(lchan, GSM_MI_TYPE_IMEI);
+ conn->loc_operation->waiting_for_imei = 1;
break;
case GSM_MI_TYPE_IMEI:
case GSM_MI_TYPE_IMEISV: