aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_dl.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-08 12:13:08 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-20 11:31:07 +0200
commitfecece0e59ab5ff705887a1247df6e02836d7c66 (patch)
tree1359a27a39d5474981b6aa24bdffcff064c9be5b /src/tbf_dl.cpp
parente04e0b0a20fb2b93855de0106873c90a88c53052 (diff)
tbf: Add MS object management to TBF code
This commit adds MS object creation and cleanup to the TBF related code. MS objects are created when a TBF that has been "anonymous" so far gets associated with a TLLI. When a TBF is replaced by another, the old TBF is detached and the new one is attached to the MS. When all TBFs have been detached, the MS object gets deleted. The TBF related code should not call attach_tbf/detach_tbf directly but use set_ms instead to make sure, that the references are updated properly. GprsMs::detach_tbf also calls set_ms(NULL) on the detached TBF object. The MS object is not really used yet, the focus is still on object creation, TBF association, and cleanup. Ticket: #1674 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf_dl.cpp')
-rw-r--r--src/tbf_dl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 0aa22f90..aec1535f 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -199,6 +199,7 @@ static int tbf_new_dl_assignment(struct gprs_rlcmac_bts *bts,
dl_tbf->m_tlli = tlli;
dl_tbf->m_tlli_valid = 1;
dl_tbf->ta = ta;
+ dl_tbf->update_ms(tlli);
LOGP(DRLCMAC, LOGL_DEBUG, "%s [DOWNLINK] START\n", tbf_name(dl_tbf));
@@ -793,6 +794,7 @@ void gprs_rlcmac_dl_tbf::reuse_tbf(const uint8_t *data, const uint16_t len)
new_tbf->m_tlli_valid = m_tlli_valid;
new_tbf->ta = ta;
new_tbf->assign_imsi(m_imsi);
+ new_tbf->update_ms(m_tlli);
/* Copy over all data to the new TBF */
new_tbf->m_llc.put_frame(data, len);