diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-16 18:33:18 +0200 |
---|---|---|
committer | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2013-10-28 12:54:09 +0400 |
commit | 1c344e26689fc84ceb1fda1ab9e061462af2678b (patch) | |
tree | 9ee7193af477dd73b615ddaec512ecf8d22a123b /src/gprs_rlcmac_sched.cpp | |
parent | 7380babdba39faa090e5dff442e2afbeec202c16 (diff) |
tbf: Prepare to make thing things private in the tbf, start with the state
There really shouldn't be too many callers of state. Instead the
tbf should dispatch depending on the internal state. For now
introduce state_is and state_is_not accessor functions so we can
start to see who is using the internal state.
Diffstat (limited to 'src/gprs_rlcmac_sched.cpp')
-rw-r--r-- | src/gprs_rlcmac_sched.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index f3edaaca..476d7812 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -103,7 +103,7 @@ uint8_t sched_select_uplink(uint8_t trx, uint8_t ts, uint32_t fn, /* we don't need to give resources in FINISHED state, * because we have received all blocks and only poll * for packet control ack. */ - if (tbf->state != GPRS_RLCMAC_FLOW) + if (tbf->state_is_not(GPRS_RLCMAC_FLOW)) continue; /* use this USF */ @@ -182,8 +182,8 @@ struct msgb *sched_select_downlink(uint8_t trx, uint8_t ts, uint32_t fn, if (tbf->direction != GPRS_RLCMAC_DL_TBF) continue; /* no DL resources needed, go next */ - if (tbf->state != GPRS_RLCMAC_FLOW - && tbf->state != GPRS_RLCMAC_FINISHED) + if (tbf->state_is_not(GPRS_RLCMAC_FLOW) + && tbf->state_is_not(GPRS_RLCMAC_FINISHED)) continue; /* waiting for CCCH IMM.ASS confirm */ |