aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlc.cpp
diff options
context:
space:
mode:
authoraravind sirsikar <arvind.sirsikar@radisys.com>2016-11-02 15:48:00 +0530
committeraravind sirsikar <arvind.sirsikar@radisys.com>2016-11-02 15:48:00 +0530
commitfb41afaaf69f1abeb56b1d95c0c707448e209b70 (patch)
treeaaf1f9c0a53e06738435d74ef6e67b07763c329f /src/rlc.cpp
parent9434e52af988cf724b1974a3911f46d14e6f4846 (diff)
EGPRS: fix for EPDAN out of window
Fix alignment of EPDAN outside the RLC transmit window, according to section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. Without this fix PCU was dropping the EPDAN message and not updating the status of BSNs which are inside the RLC window. This patch updates the status of the BSNs which are inside the window and ignores the remaining bits. Related: OS#1789 Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6
Diffstat (limited to 'src/rlc.cpp')
-rw-r--r--src/rlc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rlc.cpp b/src/rlc.cpp
index ee2635a..2bffccb 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -105,7 +105,9 @@ void gprs_rlc_dl_window::update(BTS *bts, const struct bitvec *rbb,
uint16_t first_bsn, uint16_t *lost,
uint16_t *received)
{
- unsigned num_blocks = rbb->cur_bit;
+ unsigned dist = distance();
+ unsigned num_blocks = rbb->cur_bit > dist
+ ? dist : rbb->cur_bit;
unsigned bsn;
/* first_bsn is in range V(A)..V(S) */