aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-21 15:24:02 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-24 12:23:50 +0200
commit6835cead8c9e13fbbbb7b100a4c18a031f92421f (patch)
tree27da88a0ba5154254f67fab840f7a81f5cd26b95 /src/gprs_ms.h
parent6e013a136a9286e92cee0d9b5b4f0c7bcea5fd51 (diff)
ms: Store references to replaced TBFs in the MS object
Currently when calling GprsMs::attach_tbf and a TBF of the same direction already exists, the old TBF gets detached from the MS object. Therefore that TBF object loses access to that MS object including for instance TLLI and IMSI. This leads to failing DL TBF reuses, since the downlink assigment cannot be sent on the PACCH later on because that must be sent on the old DL TBF which ms() is NULL and the new DL TBF cannot be retrieved. This commit fixes this bug by changing the GprsMs implementation to keep a list of replaced (old) TBFs. TBFs are only removed when they are being detached explicitely (see tbf_free and set_ms). Addresses: tbf.cpp:741 We have a schedule for downlink assignment at uplink TBF(TFI=1 TLLI=0xf35a680e DIR=UL STATE=RELEASING), but there is no downlink TBF Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_ms.h')
-rw-r--r--src/gprs_ms.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index c490e7ab..1f080ff2 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -109,13 +109,14 @@ public:
void update_error_rate(gprs_rlcmac_tbf *tbf, int percent);
- bool is_idle() const {return !m_ul_tbf && !m_dl_tbf && !m_ref;}
+ bool is_idle() const;
void* operator new(size_t num);
void operator delete(void* p);
LListHead<GprsMs>& list() {return this->m_list;}
const LListHead<GprsMs>& list() const {return this->m_list;}
+ const LListHead<gprs_rlcmac_tbf>& old_tbfs() const {return m_old_tbfs;}
void update_l1_meas(const pcu_l1_meas *meas);
const pcu_l1_meas* l1_meas() const {return &m_l1_meas;};
@@ -136,6 +137,8 @@ private:
Callback * m_cb;
gprs_rlcmac_ul_tbf *m_ul_tbf;
gprs_rlcmac_dl_tbf *m_dl_tbf;
+ LListHead<gprs_rlcmac_tbf> m_old_tbfs;
+
uint32_t m_tlli;
uint32_t m_new_ul_tlli;
uint32_t m_new_dl_tlli;
@@ -167,6 +170,11 @@ private:
struct gprs_codel *m_codel_state;
};
+inline bool GprsMs::is_idle() const
+{
+ return !m_ul_tbf && !m_dl_tbf && !m_ref && llist_empty(&m_old_tbfs);
+}
+
inline uint32_t GprsMs::tlli() const
{
return m_new_ul_tlli ? m_new_ul_tlli :