aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ms/MsTest.cpp
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 /tests/ms/MsTest.cpp
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 'tests/ms/MsTest.cpp')
-rw-r--r--tests/ms/MsTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp
index 7255da31..4e9c7e2f 100644
--- a/tests/ms/MsTest.cpp
+++ b/tests/ms/MsTest.cpp
@@ -196,36 +196,42 @@ static void test_ms_replace_tbf()
OSMO_ASSERT(!ms->is_idle());
OSMO_ASSERT(ms->ul_tbf() == NULL);
OSMO_ASSERT(ms->dl_tbf() == dl_tbf[0]);
+ OSMO_ASSERT(llist_empty(&ms->old_tbfs()));
OSMO_ASSERT(!was_idle);
ms->attach_tbf(dl_tbf[1]);
OSMO_ASSERT(!ms->is_idle());
OSMO_ASSERT(ms->ul_tbf() == NULL);
OSMO_ASSERT(ms->dl_tbf() == dl_tbf[1]);
+ OSMO_ASSERT(!llist_empty(&ms->old_tbfs()));
OSMO_ASSERT(!was_idle);
ms->attach_tbf(ul_tbf);
OSMO_ASSERT(!ms->is_idle());
OSMO_ASSERT(ms->ul_tbf() == ul_tbf);
OSMO_ASSERT(ms->dl_tbf() == dl_tbf[1]);
+ OSMO_ASSERT(!llist_empty(&ms->old_tbfs()));
OSMO_ASSERT(!was_idle);
ms->detach_tbf(ul_tbf);
OSMO_ASSERT(!ms->is_idle());
OSMO_ASSERT(ms->ul_tbf() == NULL);
OSMO_ASSERT(ms->dl_tbf() == dl_tbf[1]);
+ OSMO_ASSERT(!llist_empty(&ms->old_tbfs()));
OSMO_ASSERT(!was_idle);
ms->detach_tbf(dl_tbf[0]);
OSMO_ASSERT(!ms->is_idle());
OSMO_ASSERT(ms->ul_tbf() == NULL);
OSMO_ASSERT(ms->dl_tbf() == dl_tbf[1]);
+ OSMO_ASSERT(llist_empty(&ms->old_tbfs()));
OSMO_ASSERT(!was_idle);
ms->detach_tbf(dl_tbf[1]);
OSMO_ASSERT(ms->is_idle());
OSMO_ASSERT(ms->ul_tbf() == NULL);
OSMO_ASSERT(ms->dl_tbf() == NULL);
+ OSMO_ASSERT(llist_empty(&ms->old_tbfs()));
OSMO_ASSERT(was_idle);
delete ms;