From 977b5486b13834f31bd3510ab03f8a50369bbbdd Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 18 Feb 2019 12:23:43 +0100 Subject: a_iface: Centralize/wrap BSSAP / N-DATA transmission We don't want multiple callers to osmo_sccp_tx_data_msg() each having to hex-dump a log message about the to-be-transmitted message, with half of the caller sitest missing that printing. Let's centralize all calls of osmo_sccp_tx_data_msg() in a wrapper function which takes care of the related OSMO_ASSERT() and the related printing. Change-Id: I6159ea72cc8e0650eda6c49544acd65e9c15e817 --- tests/msc_vlr/msc_vlr_tests.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/msc_vlr/msc_vlr_tests.c') diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index eb6df095d..4a1778983 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -193,6 +193,12 @@ void conn_conclude_cm_service_req(struct ran_conn *conn, enum osmo_rat_type rx_from_ran = OSMO_RAT_GERAN_A; +/* SCCP user stub to make a_iface_tx_bssap() happy during test case execution */ +struct osmo_sccp_user { + uint8_t foo; +}; +static struct osmo_sccp_user g_scu; + struct ran_conn *conn_new(void) { struct ran_conn *conn; @@ -203,6 +209,8 @@ struct ran_conn *conn_new(void) .conn_id = 42, }; conn->iu.ue_ctx = ue_ctx; + } else { + conn->a.scu = &g_scu; } return conn; } -- cgit v1.2.3