diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-04-07 14:48:08 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-04-09 18:54:55 +0200 |
commit | 759fc0c094cfe9866a601e7f243b0d4bb79b4b62 (patch) | |
tree | 2e3709db35b1f937bccf2d143f3ba37e463f037b | |
parent | 2203f4f7c4cabf92706365d71f194a21826eb16a (diff) |
move layer_manager from xua_asp_fsm priv to osmo_ss7_asp
... this way it is publicly accessible/reachable
Change-Id: I00ec1689bfb068b9067d893fdba14d12d59f73f0
-rw-r--r-- | include/osmocom/sigtran/osmo_ss7.h | 8 | ||||
-rw-r--r-- | src/xua_asp_fsm.c | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 21c3768..6e35ee6 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -13,6 +13,7 @@ struct osmo_ss7_instance; 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 @@ struct osmo_ss7_asp { 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 @@ int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp); * 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 @@ static const struct value_string xua_asp_event_names[] = { { 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 @@ struct osmo_xlm_prim *xua_xlm_prim_alloc(enum osmo_xlm_prim_type prim_type, /* 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); } |