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
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index eb6df09..4a17789 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -193,6 +193,12 @@
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 @@
.conn_id = 42,
};
conn->iu.ue_ctx = ue_ctx;
+ } else {
+ conn->a.scu = &g_scu;
}
return conn;
}