From 710e0e9ad8947c3edf9cdb9dbd26ab062f6a0488 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 22 Apr 2021 21:03:33 +0200 Subject: [PATCH] pdch: tbf_by_tfi(): Allow returning TBFs in state RELEASING During RELEASING state the TFI, USFs, etc. are still reserved and assigned to the TBF, and hence the TBF may still use it. If callers of this function rely on not taking TBFs under RELEASING state, they should check that explicitly. It still makes sense being to operate on RELEASING TBFs, since under some circumstances the TBF may go under a previous state. See for instance 3GPP TS 44.060 sec 8.1.1.3a.2: """ If N3101 reaches the value N3101max, the network shall stop sending PACKET UPLINK ACK/NACK messages to the mobile station for that TBF and shall start timer T3169 for the TBF. If an RLC/MAC block is received from the TBF when timer T3169 is running, the network shall stop timer T3169 and resume sending PACKET UPLINK ACK/NACK messages to the TBF. When T3169 expires, the network may consider the TBF as released and reuse the TFI value. """ Change-Id: Ibb471e727388512d42794d3faa26597e2545b852 --- src/pdch.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/pdch.cpp b/src/pdch.cpp index baac0f7f..76ca1d00 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -1044,14 +1044,7 @@ gprs_rlcmac_tbf *gprs_rlcmac_pdch::tbf_by_tfi(uint8_t tfi, tbf = m_tbfs[dir][tfi]; - if (!tbf) - return NULL; - - if (tbf->state_is_not(GPRS_RLCMAC_RELEASING)) { - return tbf; - } - - return NULL; + return tbf; } void gprs_rlcmac_pdch::attach_tbf(gprs_rlcmac_tbf *tbf)