Merge bts_alloc_ms() and ms_alloc()

gprs_default_cb_ms_idle() is changed to have the same implementation as
previous bts_ms_idle_cb(), since that's the only one being used in
osmo-pcu code. It makes no sense to use different callback logic in unit
tests.

This is another step towards simplifying the code and getting rid of the
idle/active_cb().

Change-Id: I2a06d17588572a21dc5a14ddbde83766076b446d
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 4497fbd..cf1bba7 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -135,7 +135,7 @@
 	 * least this part is working okay.
 	 */
 	for (i = 0; i < (int)ARRAY_SIZE(tbfs); ++i) {
-		ms = bts_alloc_ms(bts);
+		ms = ms_alloc(bts);
 		tbfs[i] = tbf_alloc(bts, ms, dir, -1, 0);
 		if (tbfs[i] == NULL)
 			break;
@@ -155,7 +155,7 @@
 		if (tbfs[i])
 			tbf_free(tbfs[i]);
 
-	ms = bts_alloc_ms(bts);
+	ms = ms_alloc(bts);
 	tbfs[0] = tbf_alloc(bts, ms, dir, -1, 0);
 	OSMO_ASSERT(tbfs[0]);
 	tbf_free(tbfs[0]);
@@ -221,7 +221,7 @@
 
 	enable_ts_on_bts(bts, ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7);
 
-	ms = bts_alloc_ms(bts);
+	ms = ms_alloc(bts);
 	ms_set_ms_class(ms, ms_class);
 	/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
 	ms_set_timeout(ms, 0);
@@ -264,7 +264,7 @@
 
 	enable_ts_on_bts(bts, ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7);
 
-	ms = bts_alloc_ms(bts);
+	ms = ms_alloc(bts);
 	ms_set_ms_class(ms, ms_class);
 	/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
 	ms_set_timeout(ms, 0);
@@ -315,7 +315,7 @@
 
 	tfi = bts_tfi_find_free(bts, GPRS_RLCMAC_UL_TBF, &trx_no, -1);
 	OSMO_ASSERT(tfi >= 0);
-	ms = bts_alloc_ms(bts);
+	ms = ms_alloc(bts);
 	ms_set_ms_class(ms, ms_class);
 	/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
 	ms_set_timeout(ms, 0);
@@ -561,7 +561,7 @@
 
 		ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
 		if (!ms)
-			ms = bts_alloc_ms(bts);
+			ms = ms_alloc(bts);
 		ms_set_ms_class(ms, ms_class);
 		ms = alloc_tbfs(bts, ms, mode);
 		if (!ms)
@@ -770,7 +770,7 @@
 	trx->pdch[6].enable();
 	trx->pdch[7].enable();
 
-	ms = bts_alloc_ms(bts);
+	ms = ms_alloc(bts);
 	ms_set_ms_class(ms, ms_class);
 	ms_set_egprs_ms_class(ms, egprs_ms_class);
 	dl_tbf1 = dl_tbf_alloc(bts, ms, 0, false);
@@ -783,7 +783,7 @@
 	OSMO_ASSERT(numTs1 == 4);
 	printf("TBF1: numTs(%d)\n", numTs1);
 
-	ms = bts_alloc_ms(bts);
+	ms = ms_alloc(bts);
 	ms_set_ms_class(ms, ms_class);
 	ms_set_egprs_ms_class(ms, egprs_ms_class);
 	dl_tbf2 = dl_tbf_alloc(bts, ms, 0, false);