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 /src/libmsc/iucs.c | |
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 'src/libmsc/iucs.c')
-rw-r--r-- | src/libmsc/iucs.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index d6da1f795..a3092f86e 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -57,17 +57,12 @@ static struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_netw DEBUGP(DIUCS, "Allocating IuCS subscriber conn: lac %d, conn_id %" PRIx32 "\n", lac, ue->conn_id); - conn = talloc_zero(network, struct gsm_subscriber_connection); + conn = msc_subscr_conn_alloc(network, RAN_UTRAN_IU, lac); if (!conn) return NULL; - conn->network = network; - conn->via_ran = RAN_UTRAN_IU; conn->iu.ue_ctx = ue; conn->iu.ue_ctx->rab_assign_addr_enc = network->iu.rab_assign_addr_enc; - conn->lac = lac; - - llist_add_tail(&conn->entry, &network->subscr_conns); return conn; } |