aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-18 15:21:36 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-21 17:11:40 +0200
commit4f459799e31ee8fe34ae5f7b584860f699019cfc (patch)
treeb508611322c875a4aea165ebb568fca73f78e396
parentbe0cbc1b7ede65ff6c5390905fc956d52a5d88b1 (diff)
tbf: Just pass the MS object in reuse_tbf
Currently the MS will be searched based on the TLLI in resue_tbf(). Since the MS object is already known in the TBF when the TLLI is set, it can just be passed to the new TBF. This commit removes the call to update_ms() and just adds new_tbf->set_ms(ms()) which will also work as expected if ms() == NULL. Sponsored-by: On-Waves ehf
-rw-r--r--src/tbf_dl.cpp2
-rw-r--r--tests/tbf/TbfTest.err8
2 files changed, 1 insertions, 9 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 5e4a51c..d2720ae 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -802,11 +802,11 @@ void gprs_rlcmac_dl_tbf::reuse_tbf(const uint8_t *data, const uint16_t len)
return;
}
+ new_tbf->set_ms(ms());
new_tbf->m_tlli = m_tlli;
new_tbf->m_tlli_valid = m_tlli_valid;
new_tbf->ta = ta;
new_tbf->assign_imsi(m_imsi);
- new_tbf->update_ms(m_tlli, GPRS_RLCMAC_DL_TBF);
/* Copy over all data to the new TBF */
new_tbf->m_llc.put_frame(data, len);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 32f9efc..6569ccc 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -66,8 +66,6 @@ Slot Allocation (Algorithm A) for class 45
- Skipping TS 3, because not enabled
- Assign downlink TS=4
- Setting Control TS 4
-Creating MS object, TLLI = 0x00000000
-Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL)
********** TBF update **********
Slot Allocation (Algorithm A) for class 45
- Skipping TS 0, because not enabled
@@ -85,8 +83,6 @@ TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=WAIT RELEASE) New TBF TBF(TFI=1 TLLI=0x00
********** TBF ends here **********
TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=ASSIGN) free
TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=ASSIGN) stopping timer 0.
-Detaching TBF from MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=ASSIGN)
-Destroying MS object, TLLI = 0x00000000
********** TBF ends here **********
Searching for first unallocated TFI: TRX=0 first TS=4
Found TFI=0.
@@ -134,8 +130,6 @@ Slot Allocation (Algorithm A) for class 45
- Skipping TS 3, because not enabled
- Assign downlink TS=4
- Setting Control TS 4
-Creating MS object, TLLI = 0x00000000
-Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL)
********** TBF update **********
Slot Allocation (Algorithm A) for class 45
- Skipping TS 0, because not enabled
@@ -150,8 +144,6 @@ TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=ASSIGN) starting timer 0.
TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=ASSIGN) free
TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=ASSIGN) stopping timer 0.
TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=ASSIGN) Old TBF TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=WAIT RELEASE) still exists, detaching
-Detaching TBF from MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=ASSIGN)
-Destroying MS object, TLLI = 0x00000000
********** TBF ends here **********
DL packet loss of IMSI= / TLLI=0x00000000: 0%
TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=WAIT RELEASE) free