diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-01-22 17:41:33 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-08 00:45:37 +0100 |
commit | 646da1ba8dea43035c5ade1949b1876e5e1cbfa0 (patch) | |
tree | b145c079329bb241eccd86eac1b507d1a44c5823 /src/tbf.cpp | |
parent | 5a3c84d0fd41a2477463e6f1df108b5b4369a434 (diff) |
tbf: Use is_control_ts() instead of comparing TS values directly
Currently there are some places where tbf->control_ts != ts is
evaluated to check, whether ts is a control slot.
Replace these expressions by tbf->is_control_ts(ts) which does
the same whitout exposing internal fields.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index f73f1e07..35a004cf 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -861,7 +861,7 @@ struct msgb *gprs_rlcmac_tbf::create_dl_ass(uint32_t fn, uint8_t ts) struct gprs_rlcmac_dl_tbf *new_dl_tbf = NULL; int poll_ass_dl = 1; - if (direction == GPRS_RLCMAC_DL_TBF && ts != first_common_ts) { + if (direction == GPRS_RLCMAC_DL_TBF && !is_control_ts(ts)) { LOGP(DRLCMAC, LOGL_NOTICE, "Cannot poll for downlink " "assigment, because MS cannot reply. (TS=%d, " "first common TS=%d)\n", ts, @@ -1171,3 +1171,8 @@ uint8_t gprs_rlcmac_tbf::ul_slots() const return slots; } + +bool gprs_rlcmac_tbf::is_control_ts(uint8_t ts) const +{ + return ts == control_ts; +} |