aboutsummaryrefslogtreecommitdiffstats
path: root/tests/agch/agch_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/agch/agch_test.c')
-rw-r--r--tests/agch/agch_test.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c
index e6c56d97..07cf1d90 100644
--- a/tests/agch/agch_test.c
+++ b/tests/agch/agch_test.c
@@ -13,7 +13,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -23,6 +23,7 @@
#include <osmocom/core/application.h>
#include <osmo-bts/bts.h>
+#include <osmo-bts/bts_sm.h>
#include <osmo-bts/logging.h>
#include <osmo-bts/gsm_data.h>
@@ -124,13 +125,13 @@ static void test_agch_queue(void)
for (round = 1; round <= num_rounds; round++) {
for (idx = 0; idx < num_ima_per_round; idx++) {
- msg = msgb_alloc(GSM_MACBLOCK_LEN, __FUNCTION__);
+ msg = msgb_alloc(GSM_MACBLOCK_LEN, __func__);
put_imm_ass(msg, ++count);
bts_agch_enqueue(bts, msg);
imm_ass_count++;
}
for (idx = 0; idx < num_rej_per_round; idx++) {
- msg = msgb_alloc(GSM_MACBLOCK_LEN, __FUNCTION__);
+ msg = msgb_alloc(GSM_MACBLOCK_LEN, __func__);
put_imm_ass_rej(msg, ++count, 10);
bts_agch_enqueue(bts, msg);
imm_ass_rej_count++;
@@ -158,7 +159,7 @@ static void test_agch_queue(void)
if (is_agch)
multiframes++;
- rc = bts_ccch_copy_msg(bts, out_buf, &g_time, is_agch);
+ rc = bts_ccch_copy_msg(bts, out_buf, &g_time, (is_agch) ? CCCH_MSGT_AGCH : CCCH_MSGT_PCH);
ima = (struct gsm48_imm_ass *)out_buf;
switch (ima->msg_type) {
case GSM48_MT_RR_IMM_ASS:
@@ -225,7 +226,8 @@ int main(int argc, char **argv)
osmo_init_logging2(tall_bts_ctx, &bts_log_info);
- bts = gsm_bts_alloc(tall_bts_ctx, 0);
+ g_bts_sm = gsm_bts_sm_alloc(tall_bts_ctx);
+ bts = gsm_bts_alloc(g_bts_sm, 0);
if (bts_init(bts) < 0) {
fprintf(stderr, "unable to open bts\n");
exit(1);