[MERGED] libosmo-sccp[master]: move layer_manager from xua_asp_fsm priv to osmo_ss7_asp

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Apr 10 11:26:58 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: move layer_manager from xua_asp_fsm priv to osmo_ss7_asp
......................................................................


move layer_manager from xua_asp_fsm priv to osmo_ss7_asp

... this way it is publicly accessible/reachable

Change-Id: I00ec1689bfb068b9067d893fdba14d12d59f73f0
---
M include/osmocom/sigtran/osmo_ss7.h
M src/xua_asp_fsm.c
2 files changed, 10 insertions(+), 9 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index df85012..56a3ea4 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -13,6 +13,7 @@
 struct osmo_ss7_user;
 struct osmo_sccp_instance;
 struct osmo_mtp_prim;
+struct osmo_xua_layer_manager;
 
 int osmo_ss7_init(void);
 int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst);
@@ -336,6 +337,9 @@
 	uint32_t asp_id;
 	bool asp_id_present;
 
+	/* Layer Manager to which we talk */
+	struct osmo_xua_layer_manager *lm;
+
 	struct {
 		char *name;
 		char *description;
@@ -366,6 +370,10 @@
  * xUA Servers
  ***********************************************************************/
 
+struct osmo_xua_layer_manager {
+	osmo_prim_cb prim_cb;
+};
+
 struct osmo_xua_server {
 	struct llist_head list;
 	struct osmo_ss7_instance *inst;
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index d38a18a..e16e26a 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -67,18 +67,12 @@
 	{ 0, NULL }
 };
 
-struct xua_layer_manager {
-	osmo_prim_cb prim_cb;
-};
-
 /* private data structure for each FSM instance */
 struct xua_asp_fsm_priv {
 	/* pointer back to ASP to which we belong */
 	struct osmo_ss7_asp *asp;
 	/* Role (ASP/SG/IPSP) */
 	enum xua_asp_role role;
-	/* Layer Manager to which we talk */
-	struct xua_layer_manager *lm;
 
 	/* routing context[s]: list of 32bit integers */
 	/* ACTIVE: traffic mode type, tid label, drn label ? */
@@ -106,11 +100,10 @@
 /* Send a XUA LM Primitive to the XUA Layer Manager (LM) */
 void xua_asp_send_xlm_prim(struct osmo_ss7_asp *asp, struct osmo_xlm_prim *prim)
 {
-	struct xua_asp_fsm_priv *xafp = asp->fi->priv;
-	struct xua_layer_manager *lm = xafp->lm;
+	struct osmo_xua_layer_manager *lm = asp->lm;
 
 	if (lm && lm->prim_cb)
-		lm->prim_cb(&prim->oph, xafp->asp);
+		lm->prim_cb(&prim->oph, asp);
 
 	msgb_free(prim->oph.msg);
 }

-- 
To view, visit https://gerrit.osmocom.org/2263
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I00ec1689bfb068b9067d893fdba14d12d59f73f0
Gerrit-PatchSet: 7
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list