diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-24 17:35:37 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-26 20:57:40 +0100 |
commit | 9a76968ec4f5983eb941dd02c70668f61d4a3b7b (patch) | |
tree | 6270b73c977efef3b462eb760b31bd7b8a48ebe2 /src/rlc.cpp | |
parent | 9c5539d46da3e43eeb875e1849553214263ee618 (diff) |
rlc: Use uint16_t for the BSN in all cases.
The sns is only 128 for GPRS (it can be bigger for EDGE) so the
uint8_t was enough but it is bad to have inconsistencies for both
of them.
Diffstat (limited to 'src/rlc.cpp')
-rw-r--r-- | src/rlc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rlc.cpp b/src/rlc.cpp index 816efff5..c4d43d3c 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -44,7 +44,7 @@ int gprs_rlc_v_b::resend_needed(const uint16_t v_a, const uint16_t v_s, const uint16_t mod_sns, const uint16_t mod_sns_half) { - for (uint8_t bsn = v_a; bsn != v_s; bsn = (bsn + 1) & mod_sns) { + for (uint16_t bsn = v_a; bsn != v_s; bsn = (bsn + 1) & mod_sns) { uint16_t index = bsn & mod_sns_half; if (is_nacked(index) || is_resend(index)) return bsn; @@ -59,7 +59,7 @@ int gprs_rlc_v_b::mark_for_resend(const uint16_t v_a, const uint16_t v_s, { int resend = 0; - for (uint8_t bsn = v_a; bsn != v_s; bsn = (bsn + 1) & mod_sns) { + for (uint16_t bsn = v_a; bsn != v_s; bsn = (bsn + 1) & mod_sns) { uint16_t index = (bsn & mod_sns_half); if (is_unacked(index)) { /* mark to be re-send */ |