summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGus Bourg <gus@bourg.net>2011-12-14 23:20:21 +0100
committerHarald Welte <laforge@gnumonks.org>2011-12-14 23:20:21 +0100
commit4b6bc3b4b562ec6faf4f8fd9a31457c49ecac748 (patch)
tree281f8aef18221a4b23edb1516dbc1f4439d799db /src
parent4a075f82f0658e62d02c3f3b8af70e1d89b3beb1 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/gsm/gsm48.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 44baec60..379ed65c 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -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);