From b22ee29d87447a5c724187fd14d6926f0d4fb217 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sat, 22 Jul 2017 20:29:46 +0200 Subject: cosmetic: msc_vlr_tests: better place clear_cmd wrap, adjust printed msg Change-Id: Iec6f03f97803b2604f0094260cba256e72ee67bd --- openbsc/tests/msc_vlr/msc_vlr_tests.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'openbsc') diff --git a/openbsc/tests/msc_vlr/msc_vlr_tests.c b/openbsc/tests/msc_vlr/msc_vlr_tests.c index 73e4f66b4..9c3d6cea7 100644 --- a/openbsc/tests/msc_vlr/msc_vlr_tests.c +++ b/openbsc/tests/msc_vlr/msc_vlr_tests.c @@ -59,12 +59,6 @@ const char *auth_request_expect_autn; bool cipher_mode_cmd_sent; bool cipher_mode_cmd_sent_with_imeisv; -int __real_a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn); -int __wrap_a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn) -{ - btw("Sending clear command to BSC (conn_id=%u)\n", conn->a.conn_id); - return 0; -} struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex) { @@ -489,6 +483,17 @@ int __wrap_a_iface_tx_dtap(struct msgb *msg) return _validate_dtap(msg, RAN_GERAN_A); } +/* override, requires '-Wl,--wrap=a_iface_tx_clear_cmd' */ +int __real_a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn); +int __wrap_a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn) +{ + btw("BSSAP Clear --%s--> MS", ran_type_name(RAN_GERAN_A)); + OSMO_ASSERT(bssap_clear_expected); + bssap_clear_expected = false; + bssap_clear_sent = true; + return 0; +} + static int fake_vlr_tx_lu_acc(void *msc_conn_ref, uint32_t send_tmsi) { struct gsm_subscriber_connection *conn = msc_conn_ref; -- cgit v1.2.3