aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty_functions.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-04-30 14:48:45 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-05-13 14:04:17 +0200
commit38fd7523bab18f2032c3118c88a6c003235ac9cb (patch)
treecd47d398e83f1ad0482b97008b41354033a83b3f /src/pcu_vty_functions.cpp
parent9577c4d4f5d5ff0c9c0adbe553c183530b81e68f (diff)
WIP: Get rid of tbf lists in BTS
Diffstat (limited to 'src/pcu_vty_functions.cpp')
-rw-r--r--src/pcu_vty_functions.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp
index c2250d9e..54dfe3a4 100644
--- a/src/pcu_vty_functions.cpp
+++ b/src/pcu_vty_functions.cpp
@@ -103,19 +103,26 @@ static void tbf_print_vty_info(struct vty *vty, gprs_rlcmac_tbf *tbf)
int pcu_vty_show_tbf_all(struct vty *vty, struct gprs_rlcmac_bts *bts, uint32_t flags)
{
- struct llist_item *iter;
- struct gprs_rlcmac_tbf *tbf;
+ struct llist_head *iter;
+ struct GprsMs *ms;
+ const struct llist_head *ms_list = bts_ms_store(bts)->ms_list();
vty_out(vty, "UL TBFs%s", VTY_NEWLINE);
- llist_for_each_entry(iter, &bts->ul_tbfs, list) {
- tbf = (struct gprs_rlcmac_tbf *)iter->entry;
+ llist_for_each(iter, ms_list) {
+ struct gprs_rlcmac_ul_tbf *tbf;
+ ms = llist_entry(iter, typeof(*ms), list);
+ if (!(tbf = ms_ul_tbf(ms)))
+ continue;
if (tbf->state_flags & flags)
tbf_print_vty_info(vty, tbf);
}
vty_out(vty, "%sDL TBFs%s", VTY_NEWLINE, VTY_NEWLINE);
- llist_for_each_entry(iter, &bts->dl_tbfs, list) {
- tbf = (struct gprs_rlcmac_tbf *)iter->entry;
+ llist_for_each(iter, ms_list) {
+ struct gprs_rlcmac_dl_tbf *tbf;
+ ms = llist_entry(iter, typeof(*ms), list);
+ if (!(tbf = ms_dl_tbf(ms)))
+ continue;
if (tbf->state_flags & flags)
tbf_print_vty_info(vty, tbf);
}