aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/a_iface_bssap.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-04-02 23:10:28 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-04-05 01:10:32 +0200
commit93c7463fcea24517ef367101609f34264570f1d0 (patch)
tree822cf5bd33e3c5cfced7ccde8d3680d822bfd51d /src/libmsc/a_iface_bssap.c
parent16c42b5fbacb93867f41f529893b6af8a1a54c5b (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/a_iface_bssap.c')
-rw-r--r--src/libmsc/a_iface_bssap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 743814cd3..1665e2307 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -54,14 +54,10 @@ static struct gsm_subscriber_connection *subscr_conn_allocate_a(const struct a_c
LOGP(DMSC, LOGL_DEBUG, "Allocating A-Interface subscriber conn: lac %i, conn_id %i\n", lac, conn_id);
- conn = talloc_zero(network, struct gsm_subscriber_connection);
+ conn = msc_subscr_conn_alloc(network, RAN_GERAN_A, lac);
if (!conn)
return NULL;
- conn->network = network;
- conn->via_ran = RAN_GERAN_A;
- conn->lac = lac;
-
conn->a.conn_id = conn_id;
conn->a.scu = scu;
@@ -69,7 +65,6 @@ static struct gsm_subscriber_connection *subscr_conn_allocate_a(const struct a_c
* identify later which BSC is responsible for this subscriber connection */
memcpy(&conn->a.bsc_addr, &a_conn_info->bsc->bsc_addr, sizeof(conn->a.bsc_addr));
- llist_add_tail(&conn->entry, &network->subscr_conns);
LOGPCONN(conn, LOGL_DEBUG, "A-Interface subscriber connection successfully allocated!\n");
return conn;
}