From 93c7463fcea24517ef367101609f34264570f1d0 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 2 Apr 2018 23:10:28 +0200 Subject: 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 --- include/osmocom/msc/gsm_data.h | 1 - include/osmocom/msc/osmo_msc.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 29abd5d20..f3e1b94b1 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -374,7 +374,6 @@ struct gsm_sms { char text[SMS_TEXT_SIZE]; }; -struct gsm_subscriber_connection *msc_subscr_con_allocate(struct gsm_network *network); void msc_subscr_con_free(struct gsm_subscriber_connection *conn); /* control interface handling */ diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h index fb525e000..13341382b 100644 --- a/include/osmocom/msc/osmo_msc.h +++ b/include/osmocom/msc/osmo_msc.h @@ -41,6 +41,9 @@ enum msc_compl_l3_rc { MSC_CONN_REJECT = 1, }; +struct gsm_subscriber_connection *msc_subscr_conn_alloc(struct gsm_network *network, + enum ran_type via_ran, uint16_t lac); + void msc_subscr_conn_update_id(struct gsm_subscriber_connection *conn, enum complete_layer3_type from, const char *id); char *msc_subscr_conn_get_conn_id(struct gsm_subscriber_connection *conn); -- cgit v1.2.3