aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bssap.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-11-17 16:29:52 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-11-20 17:41:05 +0100
commit401db32ca2a64e2eb4beaed361cfca9ed6620c6a (patch)
tree093ffae005c840103c6cc48d9dc02f7ff38d6e25 /openbsc/src/bssap.c
parent17e03d21d2daab6c371dbe8546055539bcfab00b (diff)
HACK patch the network code..
Report to the MSC with the right code and patch it on the air...
Diffstat (limited to 'openbsc/src/bssap.c')
-rw-r--r--openbsc/src/bssap.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c
index 39f7d046d..48f4ae119 100644
--- a/openbsc/src/bssap.c
+++ b/openbsc/src/bssap.c
@@ -551,6 +551,15 @@ int dtap_rcvmsg(struct gsm_lchan *lchan, struct msgb *msg, unsigned int length)
data = msgb_put(gsm48, length - sizeof(*header));
memcpy(data, msg->l3h + sizeof(*header), length - sizeof(*header));
+ /*
+ * patch LAI entries...
+ */
+ struct gsm48_hdr *gh = (struct gsm48_hdr *)gsm48->l3h;
+ if (gh->msg_type == GSM48_MT_MM_LOC_UPD_ACCEPT) {
+ if (gh->data[2] == 0x80)
+ gh->data[2] = 0x08;
+ }
+
bts_queue_send(gsm48, header->link_id);
return 0;
}
@@ -586,7 +595,7 @@ struct msgb *bssmap_create_layer3(struct msgb *msg_l3)
lai = (struct gsm48_loc_area_id *) msgb_put(msg, sizeof(*lai));
gsm0408_generate_lai(lai, bts->network->country_code,
- bts->network->network_code, bts->location_area_code);
+ /*bts->network->network_code - 1*/ 8, bts->location_area_code);
ci = (u_int16_t *) msgb_put(msg, 2);
*ci = htons(bts->cell_identity);