aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-18 14:35:11 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-21 17:11:14 +0200
commitbe0cbc1b7ede65ff6c5390905fc956d52a5d88b1 (patch)
treefa89219a82018fff5dcab50f461e1a255ce21a55 /src/tbf.cpp
parent87597358cfe216a80405c21559ba640eedf44ad2 (diff)
tbf: Explicitly pass the direction to update_ms()
The type of the TBF update_ms() is being called on does not always reflect whether the TLLI has been signaled by the MS or the SGSN. This commit adds an additional parameter to tell the method, in which direction the TLLI has been passed. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r--src/tbf.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index c8659cfc..e3602e2b 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -96,11 +96,11 @@ void gprs_rlcmac_tbf::set_ms(GprsMs *ms)
m_ms->attach_tbf(this);
}
-void gprs_rlcmac_tbf::update_ms(uint32_t tlli)
+void gprs_rlcmac_tbf::update_ms(uint32_t tlli, enum gprs_rlcmac_tbf_direction dir)
{
if (!ms())
set_ms(bts->ms_store().get_or_create_ms(tlli));
- else if (direction == GPRS_RLCMAC_UL_TBF)
+ else if (dir == GPRS_RLCMAC_UL_TBF)
ms()->set_tlli(tlli);
else
ms()->confirm_tlli(tlli);
@@ -136,7 +136,7 @@ gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts,
tbf->set_state(GPRS_RLCMAC_ASSIGN);
tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH);
tbf_timer_start(tbf, 3169, bts->t3169, 0);
- tbf->update_ms(tlli);
+ tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
return tbf;
}
@@ -863,7 +863,8 @@ int gprs_rlcmac_tbf::extract_tlli(const uint8_t *data, const size_t len)
}
update_tlli(new_tlli);
- update_ms(new_tlli);
+ /* The TLLI has been taken from an UL message */
+ update_ms(new_tlli, GPRS_RLCMAC_UL_TBF);
LOGP(DRLCMACUL, LOGL_INFO, "Decoded premier TLLI=0x%08x of "
"UL DATA TFI=%d.\n", tlli(), rh->tfi);
if (dl_tbf) {