pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42103?usp=email )
(
2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: xua_snm: assert for unexpected condition ......................................................................
xua_snm: assert for unexpected condition
The rx DUNA/DAVA/DUPU paths are already guarded at m3ua.c and sua.c to only call xua_snm_rx_{duna,dava,dupu}() in ASP role. Hence, calling those functions is expected to always happen in ASP role.
Change-Id: I24bb335a2a856bf1a5ca255f7afbfe103ebcd86f --- M src/xua_snm.c 1 file changed, 3 insertions(+), 8 deletions(-)
Approvals: laforge: Looks good to me, but someone else must approve daniel: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/xua_snm.c b/src/xua_snm.c index f7d3192..916f6c3 100644 --- a/src/xua_snm.c +++ b/src/xua_snm.c @@ -494,9 +494,7 @@ int log_ss = osmo_ss7_asp_get_log_subsys(asp);
OSMO_ASSERT(ie_aff_pc); - - if (asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP) - return; + OSMO_ASSERT(asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP);
LOGPASP(asp, log_ss, LOGL_NOTICE, "Rx DUNA(%s) for %s\n", info_str ? info_str : "", format_affected_pcs_c(xua, asp->inst, ie_aff_pc)); @@ -529,9 +527,7 @@ int log_ss = osmo_ss7_asp_get_log_subsys(asp);
OSMO_ASSERT(ie_aff_pc); - - if (asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP) - return; + OSMO_ASSERT(asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP);
LOGPASP(asp, log_ss, LOGL_NOTICE, "Rx DAVA(%s) for %s\n", info_str ? info_str : "", format_affected_pcs_c(xua, asp->inst, ie_aff_pc)); @@ -564,8 +560,7 @@ uint32_t cause_user; uint16_t cause, user;
- if (asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP) - return; + OSMO_ASSERT(asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP);
switch (asp->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA: