diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-02 23:10:28 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-05 01:10:32 +0200 |
commit | 93c7463fcea24517ef367101609f34264570f1d0 (patch) | |
tree | 822cf5bd33e3c5cfced7ccde8d3680d822bfd51d /tests | |
parent | 16c42b5fbacb93867f41f529893b6af8a1a54c5b (diff) |
unify allocation of gsm_subscriber_connection
The current msc_subscr_con_allocate() was in fact only used by msc_vlr_tests,
while both a_iface_bssap.c and iucs.c did their own duplicate code of
allocating the gsm_subscriber_connection struct. Unify.
Drop the old msc_subscr_con_allocate(), instead add msc_subscr_conn_alloc().
The new function also takes via_ran and lac arguments directly.
The conn allocation will soon be closely tied to the subscr_conn_fsm instance
allocation, so place the new function definition alongside the other
subscr_conn_fsm API, and match its naming ("conn").
Related: OS#3122
Change-Id: Ia57b42a149a43f9c370b1310e2e1f512183993ea
Diffstat (limited to 'tests')
-rw-r--r-- | tests/msc_vlr/msc_vlr_test_rest.c | 2 | ||||
-rw-r--r-- | tests/msc_vlr/msc_vlr_tests.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/msc_vlr/msc_vlr_test_rest.c b/tests/msc_vlr/msc_vlr_test_rest.c index 3f843f06e..7fd7bae6b 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.c +++ b/tests/msc_vlr/msc_vlr_test_rest.c @@ -31,7 +31,7 @@ static void test_early_stage() EXPECT_ACCEPTED(false); btw("freshly allocated conn"); - g_conn = msc_subscr_con_allocate(net); + g_conn = msc_subscr_conn_alloc(net, RAN_GERAN_A, 123); EXPECT_ACCEPTED(false); btw("conn_fsm present, in state NEW"); diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 523f74fe4..7c54057ab 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -191,9 +191,7 @@ enum ran_type rx_from_ran = RAN_GERAN_A; struct gsm_subscriber_connection *conn_new(void) { struct gsm_subscriber_connection *conn; - conn = msc_subscr_con_allocate(net); - conn->via_ran = rx_from_ran; - conn->lac = 23; + conn = msc_subscr_conn_alloc(net, rx_from_ran, 23); if (conn->via_ran == RAN_UTRAN_IU) { struct ranap_ue_conn_ctx *ue_ctx = talloc_zero(conn, struct ranap_ue_conn_ctx); *ue_ctx = (struct ranap_ue_conn_ctx){ |