Fix generation of GPRS Routing Area in case of 3-digit MNC

This fixes a simple typo that causes erroneous GPRS Routing Area
encoding if you use 3-digit MNCs.
This commit is contained in:
Gus Bourg 2011-12-14 23:20:21 +01:00 committed by Harald Welte
parent 4a075f82f0
commit 4b6bc3b4b5
1 changed files with 1 additions and 1 deletions

View File

@ -406,7 +406,7 @@ int gsm48_construct_ra(uint8_t *buf, const struct gprs_ra_id *raid)
buf[2] = ((mnc / 10) % 10) | ((mnc % 10) << 4);
} else {
buf[1] |= (mnc % 10) << 4;
buf[2] = ((mnc / 100) % 10) | (((mcc / 10) % 10) << 4);
buf[2] = ((mnc / 100) % 10) | (((mnc / 10) % 10) << 4);
}
*(uint16_t *)(buf+3) = htons(raid->lac);