From 8b8cd938173b2c1ef1f836a613691bd9e6789b76 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 23 Mar 2018 01:47:37 +0100 Subject: fix gsm0808_enc_cell_id_list2 for leading-zero MNC Use non-deprecated API to decode encode in gsm0808_enc_cell_id_list2(). Adjust gsm0808_test.c to now expect the correct results instead of previous failure. Change-Id: I1ce78883995e0d484368046b69db5afb2b4adc97 --- src/gsm/gsm0808_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 776f091d..e4872b87 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -595,7 +595,7 @@ uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg, for (i = 0; i < cil->id_list_len; i++) { const struct osmo_cell_global_id *id = &cil->id_list[i].global; struct gsm48_loc_area_id lai; - gsm48_generate_lai(&lai, id->lai.plmn.mcc, id->lai.plmn.mnc, id->lai.lac); + gsm48_generate_lai2(&lai, &id->lai); memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); msgb_put_u16(msg, id->cell_identity); } @@ -615,7 +615,7 @@ uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg, for (i = 0; i < cil->id_list_len; i++) { const struct osmo_location_area_id *id = &cil->id_list[i].lai_and_lac; struct gsm48_loc_area_id lai; - gsm48_generate_lai(&lai, id->plmn.mcc, id->plmn.mnc, id->lac); + gsm48_generate_lai2(&lai, id); memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); } break; -- cgit v1.2.3