hnbgw: hnb info: record MCC, MNC, show on 'show hnb'

Before, MCC and MNC were always reported as zero, now the output of 'show hnb all' looks like:

  OsmoHNBGW> show hnb all
  HNB "000295-0000154153@ap.ipaccess.com" MCC 901 MNC 70 LAC 11111 RAC 99 SAC 65535 CID 1048575
     HNBAP ID 0 RUA ID 0

Change-Id: Iae094b36fa1cf18e07ed33914b9425368d7cd34b
This commit is contained in:
Neels Hofmeyr 2017-12-20 05:25:02 +01:00
parent aa8d48cbe0
commit 66d6d760aa
2 changed files with 2 additions and 3 deletions

View File

@ -67,7 +67,7 @@ osmo_hnbgw_SOURCES = hnbap_encoder.c hnbap_decoder.c hnbap_common.c \
hnbgw_vty.c \
context_map.c hnbgw_cn.c
osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) \
osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) \
$(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \
$(OSMONETIF_LIBS) \
hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \

View File

@ -380,8 +380,7 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in)
ctx->id.sac = asn1str_to_u16(&ies.sac);
ctx->id.rac = asn1str_to_u8(&ies.rac);
ctx->id.cid = asn1bitstr_to_u28(&ies.cellIdentity);
//ctx->id.mcc FIXME
//ctx->id.mnc FIXME
gsm48_mcc_mnc_from_bcd(ies.plmNidentity.buf, &ctx->id.mcc, &ctx->id.mnc);
DEBUGP(DHNBAP, "HNB-REGISTER-REQ from %s\n", ctx->identity_info);