Simplify TS alloc: fix allocation calls
Using the semantic patch below, adjust allocation-related calls to match
updated allocator signatures.
// spatch --c++ --dir src -I src --sp-file callfix.spatch --in-place --recursive-includes
// spatch --c++ --dir tests -I src --sp-file callfix.spatch --in-place --recursive-includes
@@ expression A, B, C, D, E; @@
tbf_alloc_ul_tbf(A, B, C, D, E,
(
- 1
+ true
|
- 0
+ false
)
)
@@ expression A, B, C, D, E; @@
tbf_alloc_dl_tbf(A, B, C, D, E,
(
- 1
+ true
|
- 0
+ false
)
)
Change-Id: I43c76cb49093b40eb854d324e898e821270053dc
Related: OS#2282
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index aa1d7ac..fbed45a 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -83,14 +83,14 @@
*/
gprs_rlcmac_tbf *dl_tbf = tbf_alloc_dl_tbf(the_bts.bts_data(),
NULL,
- 0, 0, 0, 0);
+ 0, 0, 0, false);
OSMO_ASSERT(dl_tbf != NULL);
dl_tbf->update_ms(0x2342, GPRS_RLCMAC_DL_TBF);
dl_tbf->set_ta(4);
gprs_rlcmac_tbf *ul_tbf = tbf_alloc_ul_tbf(the_bts.bts_data(),
dl_tbf->ms(),
- 0, 0, 0, 0);
+ 0, 0, 0, false);
OSMO_ASSERT(ul_tbf != NULL);
ul_tbf->update_ms(0x2342, GPRS_RLCMAC_UL_TBF);
@@ -172,7 +172,8 @@
tfi = the_bts->tfi_find_free(GPRS_RLCMAC_DL_TBF, &trx_no, -1);
OSMO_ASSERT(tfi >= 0);
- dl_tbf = tbf_alloc_dl_tbf(bts, NULL, trx_no, ms_class, egprs_ms_class, 1);
+ dl_tbf = tbf_alloc_dl_tbf(bts, NULL, trx_no, ms_class, egprs_ms_class,
+ true);
dl_tbf->set_ta(0);
check_tbf(dl_tbf);
@@ -2212,7 +2213,7 @@
1234, 1234, 1234, 1, 1, 0, 0, 0);
/* Does no support EGPRS */
- dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, 0, 0);
+ dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, 0, false);
OSMO_ASSERT(dl_tbf != NULL);
fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n",
dl_tbf->dl_slots(),
@@ -2226,7 +2227,7 @@
bts->egprs_enabled = 1;
/* Does support EGPRS */
- dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, ms_class, 0);
+ dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, ms_class, false);
OSMO_ASSERT(dl_tbf != NULL);
fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n",
@@ -2270,7 +2271,7 @@
bts->egprs_enabled = 1;
/* Does support EGPRS */
- dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, ms_class, 1);
+ dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, ms_class, true);
OSMO_ASSERT(dl_tbf != NULL);
fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n",