Refactor tbf_is_tfi_assigned() to avoid accessing tbf->state_fsm
The state_fsm field will be moved to subclass (DL_TBF/UL_TBF) in a
follow up commit when splitting the tbf_fsm.c implementation per
subclass.
Rearrange a bit the code to access the using the subclass pointer in the
only sublcass where it needs to be used (DL_TBF).
Change-Id: I360485c73be8636565f89ba29796d84ac94fd94e
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 20b4f8e..1857c3c 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -57,7 +57,7 @@
if (tbf_ul_ass_rts(ul_tbf))
tbf_cand->ul_ass = ul_tbf;
/* NACC ready to send. TFI assigned is needed to send messages */
- if (ul_tbf->is_tfi_assigned() && ms_nacc_rts(ul_tbf->ms()))
+ if (tbf_is_tfi_assigned(ul_tbf) && ms_nacc_rts(ul_tbf->ms()))
tbf_cand->nacc = ul_tbf;
/* FIXME: Is this supposed to be fair? The last TBF for each wins? Maybe use llist_add_tail and skip once we have all
states? */
@@ -73,7 +73,7 @@
if (tbf_ul_ass_rts(dl_tbf))
tbf_cand->ul_ass = dl_tbf;
/* NACC ready to send. TFI assigned is needed to send messages */
- if (dl_tbf->is_tfi_assigned() && ms_nacc_rts(dl_tbf->ms()))
+ if (tbf_is_tfi_assigned(dl_tbf) && ms_nacc_rts(dl_tbf->ms()))
tbf_cand->nacc = dl_tbf;
}
}