summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-22 20:29:46 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-22 21:24:58 +0200
commitb22ee29d87447a5c724187fd14d6926f0d4fb217 (patch)
treef6be881c990c148fc865ee45d4a3cbaa9cbb3db6
parent5e1f3de26cd273493918a595eec3b72c30a765fb (diff)
cosmetic: msc_vlr_tests: better place clear_cmd wrap, adjust printed msg
-rw-r--r--openbsc/tests/msc_vlr/msc_vlr_tests.c17
1 files changed, 11 insertions, 6 deletions
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;