aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gprs_gb_parse.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-21 00:39:36 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-03-15 19:18:14 +0100
commit10719b74c362591cd01c3766f74ef03639203e1d (patch)
tree4e0fed5a071f24099c9b565e11fe02f4af3f8774 /src/gprs/gprs_gb_parse.c
parent5926e840ccdea595fb63e0a51e3069882e4ce73c (diff)
implement support for 3-digit MNC with leading zeros
Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout the code base to be able to handle an MNC < 100 that has three digits (leading zeros). Note that in gbproxy_test.ok, 0-0 changes to 000-000 instead of 000-00, because the parsed ra buffer is 000000 which results in 000-000, while 00f000 would result in 000-00. IOW this is expected. Change-Id: I7437dfaa586689e2bef0d4be6537e5577a8f6c26
Diffstat (limited to 'src/gprs/gprs_gb_parse.c')
-rw-r--r--src/gprs/gprs_gb_parse.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gprs/gprs_gb_parse.c b/src/gprs/gprs_gb_parse.c
index ba78e8977..18565ae65 100644
--- a/src/gprs/gprs_gb_parse.c
+++ b/src/gprs/gprs_gb_parse.c
@@ -551,24 +551,21 @@ void gprs_gb_log_parse_context(int log_level,
if (parse_ctx->bssgp_raid_enc) {
struct gprs_ra_id raid;
gsm48_parse_ra(&raid, parse_ctx->bssgp_raid_enc);
- LOGPC(DGPRS, log_level, "%s BSSGP RAID %u-%u-%u-%u", sep,
- raid.mcc, raid.mnc, raid.lac, raid.rac);
+ LOGPC(DGPRS, log_level, "%s BSSGP RAID %s", sep, osmo_rai_name(&raid));
sep = ",";
}
if (parse_ctx->raid_enc) {
struct gprs_ra_id raid;
gsm48_parse_ra(&raid, parse_ctx->raid_enc);
- LOGPC(DGPRS, log_level, "%s RAID %u-%u-%u-%u", sep,
- raid.mcc, raid.mnc, raid.lac, raid.rac);
+ LOGPC(DGPRS, log_level, "%s RAID %s", sep, osmo_rai_name(&raid));
sep = ",";
}
if (parse_ctx->old_raid_enc) {
struct gprs_ra_id raid;
gsm48_parse_ra(&raid, parse_ctx->old_raid_enc);
- LOGPC(DGPRS, log_level, "%s old RAID %u-%u-%u-%u", sep,
- raid.mcc, raid.mnc, raid.lac, raid.rac);
+ LOGPC(DGPRS, log_level, "%s old RAID %s", sep, osmo_rai_name(&raid));
sep = ",";
}