From 6d86628e5b6d81afae4ca1f24201ee90bfab1c2a Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Fri, 19 Jun 2015 09:08:23 +0200 Subject: tbf: Always create an MS object on TBF allocation Currently the MS object are created when the TLLI gets known. Therefore some information (TA, MS class) must be stored in the TBF itself and is copied to the MS object later on. This would get even more complex, if the allocation algorithms were extended based on this scheme. This commit ensures, that an MS object will always be created on TBF allocation, even if the TLLI is not yet known. These 'anonymous' objects are still managed by the MS storage. To avoid dangling entries without a TLLI there (which cannnot be retrieved anyway), the timer in the MS objects is not started after all TBF have been detached, so that they get deleted immediately in that case. Note that an MS object can still be removed (e.g. by replacement) from an existing TBF, so tbf->ms() can be NULL. Ticket: #1794 Sponsored-by: On-Waves ehf --- src/gprs_ms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gprs_ms.cpp') diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp index 2cfedc3b..0c1ae650 100644 --- a/src/gprs_ms.cpp +++ b/src/gprs_ms.cpp @@ -240,7 +240,7 @@ void GprsMs::detach_tbf(gprs_rlcmac_tbf *tbf) if (tbf->ms() == this) tbf->set_ms(NULL); - if (!m_dl_tbf && !m_ul_tbf) + if (!m_dl_tbf && !m_ul_tbf && tlli() != 0) start_timer(); update_status(); -- cgit v1.2.3