From ed41e8c08e74d3bce2b61231c4b9f8257bc76101 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 6 Jun 2019 16:44:20 +0200 Subject: Introduce msc_is_{sccplite,aoip}() helpers Having the helper makes it easier to read/find for transport type checks. It will be ifurther re-used in forthcoming commits. Change-Id: Ic0ee4c472e29ec3092049e5e23b744395613616d --- src/osmo-bsc/bsc_subscr_conn_fsm.c | 17 ++--------------- src/osmo-bsc/osmo_bsc_sigtran.c | 3 +-- 2 files changed, 3 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 87ad56740..7b9f912b2 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -1058,14 +1058,7 @@ bool gscon_is_aoip(struct gsm_subscriber_connection *conn) if (!conn || !conn->sccp.msc) return false; - switch (conn->sccp.msc->a.asp_proto) { - case OSMO_SS7_ASP_PROT_SUA: - case OSMO_SS7_ASP_PROT_M3UA: - return true; - - default: - return false; - } + return msc_is_aoip(conn->sccp.msc); } bool gscon_is_sccplite(struct gsm_subscriber_connection *conn) @@ -1073,11 +1066,5 @@ bool gscon_is_sccplite(struct gsm_subscriber_connection *conn) if (!conn || !conn->sccp.msc) return false; - switch (conn->sccp.msc->a.asp_proto) { - case OSMO_SS7_ASP_PROT_IPA: - return true; - - default: - return false; - } + return msc_is_sccplite(conn->sccp.msc); } diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 5d61c3205..8303c4f53 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -523,8 +523,7 @@ int osmo_bsc_sigtran_init(struct llist_head *mscs) * an X-Osmo-IGN flag telling osmo-mgw to ignore CallID mismatches for this endpoint. * If an explicit VTY command has already indicated whether or not to send X-Osmo-IGN, do * not overwrite that setting. */ - if (msc->a.asp_proto == OSMO_SS7_ASP_PROT_IPA - && !msc->x_osmo_ign_configured) + if (msc_is_sccplite(msc) && !msc->x_osmo_ign_configured) msc->x_osmo_ign |= MGCP_X_OSMO_IGN_CALLID; /* If unset, use default local SCCP address */ -- cgit v1.2.3