diff options
-rw-r--r-- | src/bts.cpp | 12 | ||||
-rw-r--r-- | tests/tbf/TbfTest.err | 9 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index 98a23ccd..65289158 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -984,17 +984,23 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request, "TLLI=0x%08x while %s still " "exists. Killing pending UL TBF\n", tlli, tbf_name(ul_tbf)); + /* The MS will not use the old TBF again, so we can + * safely throw it away immediately */ tbf_free(ul_tbf); ul_tbf = NULL; } if (dl_tbf) { + /* TODO: There a chance that releasing dl_tbf can be + * avoided if this PDCH is the control TS of dl_tbf, + * but this needs to be checked with the spec. If an MS + * losed the DL TBF because of PDCH mismatches only, + * this check would make sense. */ LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " "TLLI=0x%08x while %s still exists. " - "Killing pending DL TBF\n", tlli, + "Release pending DL TBF\n", tlli, tbf_name(dl_tbf)); - tbf_free(dl_tbf); - dl_tbf = NULL; + dl_tbf->release(); } LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF " "in packet resource request of single " diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 024e2d8d..8401e083 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1792,12 +1792,9 @@ Searching for first unallocated TFI: TRX=0 Found TFI=0. +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++ ------------------------- RX : Uplink Control Block ------------------------- -Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Killing pending DL TBF -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) stopping timer 0. -PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN), 0 TBFs, USFs = 00, TFIs = 00000000. -Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) -********** TBF ends here ********** +Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Release pending DL TBF +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT RELEASE +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) restarting timer 3193 while old timer 0 pending MS requests UL TBF in packet resource request of single block, so we provide one: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=1 |