pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43485?usp=email )
Change subject: xua_as_fsm: Do not send NOTIFY with all AS of ASP ......................................................................
xua_as_fsm: Do not send NOTIFY with all AS of ASP
The NOTIFY message is sharing Routing Context (AS) state change. When the FSM of a given AS changes, we don't want to signal the state change of that single AS to all its ASPs, not all other AS served by those ASPs.
This partially reverts old commit e4fc91b9fc3aa3194eea02ef10635323b7558c18.
Related: OS#7062 Change-Id: I252f9e16ab92a264559385d47690552d75837569 --- M src/xua_as_fsm.c 1 file changed, 10 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/85/43485/1
diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 0ba1b2a..9460cf8 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -43,14 +43,6 @@ return msg; }
-static int fill_notify_route_ctx(const struct osmo_ss7_asp *asp, struct osmo_xlm_prim_notify *npar) -{ - npar->route_ctx_count = ss7_asp_get_all_rctx(asp, npar->route_ctx, ARRAY_SIZE(npar->route_ctx), NULL); - if (npar->route_ctx_count > 0) - npar->presence |= NOTIFY_PAR_P_ROUTE_CTX; - return 0; -} - static void tx_notify(struct osmo_ss7_asp *asp, struct osmo_xlm_prim_notify *npar) { const char *type_name, *info_name, *info_str; @@ -60,7 +52,6 @@
LOGPASP(asp, DLSS7, LOGL_INFO, "Tx NOTIFY Type %s:%s (%s)\n", type_name, info_name, info_str); - fill_notify_route_ctx(asp, npar); struct msgb *msg = encode_notify(npar); osmo_ss7_asp_send(asp, msg); } @@ -139,8 +130,6 @@ npar->presence &= ~NOTIFY_PAR_P_ASP_ID; }
- fill_notify_route_ctx(asp, npar); - msg = encode_notify(npar); osmo_ss7_asp_send(asp, msg); sent++; @@ -248,10 +237,20 @@
static void fill_notify_statchg_pars(const struct osmo_fsm_inst *fi, struct osmo_xlm_prim_notify *npar) { + struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv; + struct osmo_ss7_as *as = xafp->as; + *npar = (struct osmo_xlm_prim_notify){ .status_type = M3UA_NOTIFY_T_STATCHG, };
+ /* Add the routing context, if it is configured */ + if (as->cfg.routing_key.context > 0) { + npar->presence |= NOTIFY_PAR_P_ROUTE_CTX; + npar->route_ctx[0] = as->cfg.routing_key.context; + npar->route_ctx_count = 1; + } + switch (fi->state) { case XUA_AS_S_INACTIVE: npar->status_info = M3UA_NOTIFY_I_AS_INACT;