aboutsummaryrefslogtreecommitdiffstats
path: root/src/sccp_user.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-08-11 17:42:35 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2017-08-11 17:42:35 +0200
commitc34bcd42e494200a7057dadcfa7e34fdbe6c0fca (patch)
treedb54064d3c72be6876cb27f7cf085996cba14328 /src/sccp_user.c
parent564ff618004be6b2126156eec1c97c13d86ff770 (diff)
sccp: function to get sccp instance from sccp user
It is currently impossible to find out which SCCP instance handles a particular user. Introduce function to lookup the SCCP instance from a given SCCP user. Change-Id: I9562c4f1d00e2ebb3252c5dea598b643aa393719
Diffstat (limited to 'src/sccp_user.c')
-rw-r--r--src/sccp_user.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sccp_user.c b/src/sccp_user.c
index c0e2b5a..a4568cf 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -602,3 +602,13 @@ struct osmo_ss7_instance *osmo_sccp_get_ss7(struct osmo_sccp_instance *sccp)
{
return sccp->ss7;
}
+
+/*! \brief get the SCCP instance that is related to the given sccp user
+ * \param[in] scu SCCP user
+ * \returns SCCP instance; NULL if scu was NULL */
+struct osmo_sccp_instance *osmo_sccp_get_sccp(const struct osmo_sccp_user *scu)
+{
+ if (!scu)
+ return NULL;
+ return scu->inst;
+}