pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sigtran/+/42103?usp=email )
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(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran
refs/changes/03/42103/1
diff --git a/src/xua_snm.c b/src/xua_snm.c
index f7d3192..3990ba4 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -495,8 +495,7 @@
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));
@@ -530,8 +529,7 @@
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 +562,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:
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42103?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I24bb335a2a856bf1a5ca255f7afbfe103ebcd86f
Gerrit-Change-Number: 42103
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>