diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-08-27 13:18:24 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-08-28 12:23:07 +0200 |
commit | ac49d0943a2a384ef99cce0933cac74d80563407 (patch) | |
tree | 21a064aeef6c371b95811c85ef20f129eb66af59 /src/bts.cpp | |
parent | 16d29c7da4ee516b4ef0a6ec18cec18f8a76d7fa (diff) |
poll: Add a max_delay parameter to PollController::expireTimedout
Currently the maximum additional delay is hard coded to 13. This
value depends on the source of the frame number value.
This commit adds the max_delay parameter to make it caller dependant.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.cpp')
-rw-r--r-- | src/bts.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index 141431a5..661c5114 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -136,8 +136,16 @@ BTS::~BTS() void BTS::set_current_frame_number(int fn) { + /* The UL frame numbers lag 3 behind the DL frames and the data + * indication is only sent after all 4 frames of the block have been + * received. Sometimes there is an idle frame between the end of one + * and start of another frame (every 3 blocks). So the timeout should + * definitely be there if we're more than 8 frames past poll_fn. Let's + * stay on the safe side and say 13 or more. */ + const static int max_delay = 13; + m_cur_fn = fn; - m_pollController.expireTimedout(m_cur_fn); + m_pollController.expireTimedout(m_cur_fn, max_delay); } int BTS::add_paging(uint8_t chan_needed, uint8_t *identity_lv) |