From afbf189ef28a3f9fd7a95bdf88b90be8e7eb0c5b Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Wed, 9 Oct 2019 20:26:47 +0700 Subject: [PATCH] VTY: refactor pcu_vty_show_ms_all(): use show_ms() Change-Id: I72aa1a1de22602a3ad2a4d19604ae0935c88c750 --- src/pcu_vty_functions.cpp | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 3008267f..fd8474be 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -124,30 +124,6 @@ int pcu_vty_show_tbf_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data, bool return CMD_SUCCESS; } -int pcu_vty_show_ms_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data) -{ - BTS *bts = bts_data->bts; - LListHead *ms_iter; - - llist_for_each(ms_iter, &bts->ms_store().ms_list()) { - GprsMs *ms = ms_iter->entry(); - - vty_out(vty, "MS TLLI=%08x, TA=%d, CS-UL=%s, CS-DL=%s, LLC=%zd, Cl=%d, E-Cl=%d," - " TBF-UL=%s, TBF-DL=%s, IMSI=%s%s", - ms->tlli(), - ms->ta(), mcs_name(ms->current_cs_ul()), - mcs_name(ms->current_cs_dl()), - ms->llc_queue()->size(), - ms->ms_class(), - ms->egprs_ms_class(), - ms->ul_tbf() ? ms->ul_tbf()->state_name() : "NA", - ms->dl_tbf() ? ms->dl_tbf()->state_name() : "NA", - ms->imsi(), - VTY_NEWLINE); - } - return CMD_SUCCESS; -} - static int show_ms(struct vty *vty, GprsMs *ms) { unsigned i; @@ -230,6 +206,17 @@ static int show_ms(struct vty *vty, GprsMs *ms) return CMD_SUCCESS; } +int pcu_vty_show_ms_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data) +{ + BTS *bts = bts_data->bts; + LListHead *ms_iter; + + llist_for_each(ms_iter, &bts->ms_store().ms_list()) + show_ms(vty, ms_iter->entry()); + + return CMD_SUCCESS; +} + int pcu_vty_show_ms_by_tlli(struct vty *vty, struct gprs_rlcmac_bts *bts_data, uint32_t tlli) {