aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-10-09 20:26:47 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-10-09 20:26:47 +0700
commitafbf189ef28a3f9fd7a95bdf88b90be8e7eb0c5b (patch)
tree12c91dd59798749979677794e1c758781c9e8607
parentd752d7cebe51bd690d31147ef5173c3f33ec7f41 (diff)
VTY: refactor pcu_vty_show_ms_all(): use show_ms()
-rw-r--r--src/pcu_vty_functions.cpp35
1 files 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<GprsMs> *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<GprsMs> *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)
{