summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/gsm48_mm.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-10-30 10:26:20 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2012-10-30 10:26:20 +0100
commit07f83456460a2cdb8d288ac647f04a5bc09dc1cf (patch)
treebb213ff0af638ac4439ae079eda12b094b34fbea /src/host/layer23/src/mobile/gsm48_mm.c
parenta4924a33b03a13ad78d69785b73d3d2dd09b18b2 (diff)
Fixed decoding of hexadecimal LAI components
libosmocore has changed its LAI decoding from hex to decimal. This caused wrong decoding of MCC and MNC. In order to provide required hex transcoding, special hex encoding and decoding function are added to mobile/sysinfo.c.
Diffstat (limited to 'src/host/layer23/src/mobile/gsm48_mm.c')
-rw-r--r--src/host/layer23/src/mobile/gsm48_mm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c
index a8f699d2..331cfe3b 100644
--- a/src/host/layer23/src/mobile/gsm48_mm.c
+++ b/src/host/layer23/src/mobile/gsm48_mm.c
@@ -1577,7 +1577,7 @@ static int gsm48_mm_rx_tmsi_realloc_cmd(struct osmocom_ms *ms, struct msgb *msg)
return -EINVAL;
}
/* LAI */
- gsm48_decode_lai(lai, &subscr->mcc, &subscr->mnc, &subscr->lac);
+ gsm48_decode_lai_hex(lai, &subscr->mcc, &subscr->mnc, &subscr->lac);
/* MI */
mi = gh->data + sizeof(struct gsm48_loc_area_id);
mi_type = mi[1] & GSM_MI_TYPE_MASK;
@@ -2349,7 +2349,7 @@ static int gsm48_mm_tx_loc_upd_req(struct osmocom_ms *ms)
*
* NOTE: The TMSI is only valid within a LAI!
*/
- gsm48_encode_lai(&nlu->lai, subscr->mcc, subscr->mnc, subscr->lac);
+ gsm48_encode_lai_hex(&nlu->lai, subscr->mcc, subscr->mnc, subscr->lac);
LOGP(DMM, LOGL_INFO, " using LAI (mcc %s mnc %s " "lac 0x%04x)\n",
gsm_print_mcc(subscr->mcc),
gsm_print_mnc(subscr->mnc), subscr->lac);
@@ -2419,7 +2419,7 @@ static int gsm48_mm_rx_loc_upd_acc(struct osmocom_ms *ms, struct msgb *msg)
stop_mm_t3212(mm); /* 4.4.2 */
/* LAI */
- gsm48_decode_lai(lai, &subscr->mcc, &subscr->mnc, &subscr->lac);
+ gsm48_decode_lai_hex(lai, &subscr->mcc, &subscr->mnc, &subscr->lac);
/* stop location update timer */
stop_mm_t3210(mm);