From dc18606cae2c1a273426a89c23b8e849c4ca04e7 Mon Sep 17 00:00:00 2001 From: Michael McTernan Date: Fri, 3 Jul 2015 10:33:50 +0100 Subject: Add mnc_t for 3 digit mncs. Signed-off-by: Michael McTernan --- src/gb/gprs_bssgp.c | 9 +++++---- src/gb/gprs_bssgp_vty.c | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/gb') diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index 5ef18872..06d683a5 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -267,9 +267,10 @@ static int bssgp_rx_bvc_reset(struct msgb *msg, struct tlv_parsed *tp, /* actually extract RAC / CID */ bctx->cell_id = bssgp_parse_cell_id(&bctx->ra_id, TLVP_VAL(tp, BSSGP_IE_CELL_ID)); - LOGP(DBSSGP, LOGL_NOTICE, "Cell %u-%u-%u-%u CI %u on BVCI %u\n", - bctx->ra_id.mcc, bctx->ra_id.mnc, bctx->ra_id.lac, - bctx->ra_id.rac, bctx->cell_id, bvci); + LOGP(DBSSGP, LOGL_NOTICE, "Cell %u-%0*u-%u-%u CI %u on BVCI %u\n", + bctx->ra_id.mcc, + bctx->ra_id.mnc.two_digits ? 2 : 3, bctx->ra_id.mnc.network_code, + bctx->ra_id.lac, bctx->ra_id.rac, bctx->cell_id, bvci); } /* Send NM_BVC_RESET.ind to NM */ @@ -587,7 +588,7 @@ static int fc_queue_timer_cfg(struct bssgp_flow_control *fc) if (llist_empty(&fc->queue)) return 0; - fcqe = llist_entry(&fc->queue.next, struct bssgp_fc_queue_element, + fcqe = llist_entry(fc->queue.next, struct bssgp_fc_queue_element, list); if (fc->bucket_leak_rate != 0) { diff --git a/src/gb/gprs_bssgp_vty.c b/src/gb/gprs_bssgp_vty.c index d8e1d32f..f2263dab 100644 --- a/src/gb/gprs_bssgp_vty.c +++ b/src/gb/gprs_bssgp_vty.c @@ -83,9 +83,10 @@ DEFUN(cfg_bssgp, cfg_bssgp_cmd, static void dump_bvc(struct vty *vty, struct bssgp_bvc_ctx *bvc, int stats) { - vty_out(vty, "NSEI %5u, BVCI %5u, RA-ID: %u-%u-%u-%u, CID: %u, " + vty_out(vty, "NSEI %5u, BVCI %5u, RA-ID: %u-%0*u-%u-%u, CID: %u, " "STATE: %s%s", bvc->nsei, bvc->bvci, bvc->ra_id.mcc, - bvc->ra_id.mnc, bvc->ra_id.lac, bvc->ra_id.rac, bvc->cell_id, + bvc->ra_id.mnc.two_digits ? 2 : 3, bvc->ra_id.mnc.network_code, + bvc->ra_id.lac, bvc->ra_id.rac, bvc->cell_id, bvc->state & BVC_S_BLOCKED ? "BLOCKED" : "UNBLOCKED", VTY_NEWLINE); -- cgit v1.2.3