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
This commit is contained in:
parent
f450f442f3
commit
ed41e8c08e
|
@ -191,5 +191,25 @@ static inline int mgcp_port_to_cic(uint16_t port, uint16_t base)
|
|||
return (port - base) / 2;
|
||||
}
|
||||
|
||||
static inline bool msc_is_aoip(const struct bsc_msc_data *msc)
|
||||
{
|
||||
switch (msc->a.asp_proto) {
|
||||
case OSMO_SS7_ASP_PROT_SUA:
|
||||
case OSMO_SS7_ASP_PROT_M3UA:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool msc_is_sccplite(const struct bsc_msc_data *msc)
|
||||
{
|
||||
switch (msc->a.asp_proto) {
|
||||
case OSMO_SS7_ASP_PROT_IPA:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue