Refactor code related to DL-TBF upgrade to multislot
* Make clear the code relates to DL-TBF and not UL-TBF.
* Change wording to "upgrade" to match the existing field and API
"tbf_can_upgrade_to_multislot()".
* Free the TBF if we cannot allocate new resources.
Change-Id: I0e4f8d7e46235a471b2124b280c81ff07b6967a4
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 3316702..215a7ae 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -283,8 +283,8 @@
dump_assignment(ul_tbf, "UL", verbose);
- /* now update the dl_tbf */
- dl_tbf->update();
+ /* now upgrade the dl_tbf */
+ OSMO_ASSERT(dl_tbf_upgrade_to_multislot(dl_tbf) == 0);
dump_assignment(dl_tbf, "DL", verbose);
check_tfi_usage(bts);
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 79d0f63..314d2d9 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -2408,7 +2408,7 @@
ws_check(dl_tbf, __func__, 1, 128 + 1 * 64, false);
- dl_tbf->update();
+ OSMO_ASSERT(dl_tbf_upgrade_to_multislot(dl_tbf) == 0);
/* window size should be 384 */
ws_check(dl_tbf, __func__, 4, 128 + 4 * 64, true);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 2606b01..048e03e 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -7146,7 +7146,7 @@
TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS) setting EGPRS DL window size to 192, base(128) slots(1) ws_pdch(64)
ws(192)
DL TBF slots: 0x10, N: 1, WS: 192
-********** DL-TBF update **********
+TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS) Upgrade to multislot
PDCH(bts=0,trx=0,ts=4) Detaching TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001.
[DL] algo B <multi> (suggested TRX: -1): Alloc start
Found first unallocated TRX=0 TFI=0