diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-04-30 14:48:45 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-04-26 14:08:42 +0200 |
commit | 9b4289f0338f59503b758e666918b4e763d4f3a5 (patch) | |
tree | 0acbdf990349b4fc409519fc7b36547ade711a70 /src/pcu_vty_functions.cpp | |
parent | c43570c3519d2c82ecb6a0323c6fe0a6e0efec57 (diff) |
WIP: Get rid of tbf lists in BTSpespin/tbf-list
Change-Id: I244b408decaa87c0ae6fd25ce5e2bd5ab91e335e
Diffstat (limited to 'src/pcu_vty_functions.cpp')
-rw-r--r-- | src/pcu_vty_functions.cpp | 19 |
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); } |