tbf: Only free TBF if it was replaced in rcv_control_ack

Currently the TBF whose PACCH has been used to send an assigment
is freed if it is in state WAIT_RELEASE. Sometimes this TBF could
be used for several assignments (e.g. an 'old' DL TBF is used to
assign an UL and then a DL TBF). The second of these assigments will
never be sent in that case. On the other hand, the MS replaces a
TBF of the same direction, so the old one can be freed in that case.

Only free the TBF if it is in state WAIT_RELEASE and has the same
direction like the new one.

Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2016-02-01 18:15:35 +01:00
parent be80c3670e
commit 7d5157ee17
1 changed files with 4 additions and 2 deletions

View File

@ -799,7 +799,8 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet,
"TBF is gone TLLI=0x%08x\n", tlli);
return;
}
if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE))
if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE) &&
tbf->direction == new_tbf->direction)
tbf_free(tbf);
if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) {
@ -836,7 +837,8 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet,
"TBF is gone TLLI=0x%08x\n", tlli);
return;
}
if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE))
if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE) &&
tbf->direction == new_tbf->direction)
tbf_free(tbf);
new_tbf->set_state(GPRS_RLCMAC_FLOW);