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.h | |
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.h')
-rw-r--r-- | src/tbf.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -144,6 +144,8 @@ struct gprs_rlcmac_tbf { uint8_t dl_slots() const; uint8_t ul_slots() const; + bool is_control_ts(uint8_t ts) const; + /* EGPRS */ bool is_egprs_enabled() const; void enable_egprs(); @@ -357,10 +359,6 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { int release(); int abort(); - bool is_control_ts(uint8_t ts) const { - return ts == control_ts; - } - /* TODO: add the gettimeofday as parameter */ struct msgb *llc_dequeue(bssgp_bvc_ctx *bctx); |