pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/43810?usp=email )
Change subject: sigtran: N-NOTICE.ind: Use proper SCCP-User return reason ......................................................................
sigtran: N-NOTICE.ind: Use proper SCCP-User return reason
Until recently, libosmo-sigtran was incorrectly expecting low-level wire-format cause in N-NOTICE.ind. Nowadays it supports specific reason values in the SCCP-User SAP, so use those instead. This change is backward-compatible since the value for both enums are the same as per specs.
Change-Id: If3e74e9fd0bb91d529429f02a90749a4ef380fea Related: OS#2601 --- M TODO-RELEASE M src/libmsc/sccp_ran.c 2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/10/43810/1
diff --git a/TODO-RELEASE b/TODO-RELEASE index b6d61b1..5e970b9 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line libosmo-sigtran >2.3.0 OSMO_SCCP_REL_REASON_NSU_* +libosmo-sigtran >2.3.0 OSMO_SCCP_RETURN_REASON_*, osmo_sccp_return_reason_name() diff --git a/src/libmsc/sccp_ran.c b/src/libmsc/sccp_ran.c index 46fd196..026db0b 100644 --- a/src/libmsc/sccp_ran.c +++ b/src/libmsc/sccp_ran.c @@ -22,7 +22,6 @@
#include <osmocom/core/logging.h>
-#include <osmocom/sccp/sccp_types.h> #include <osmocom/sigtran/sccp_sap.h> #include <osmocom/sigtran/sccp_helpers.h>
@@ -68,18 +67,18 @@ if (!rp) { LOGP(DMSC, LOGL_DEBUG, "(calling_addr=%s) N-NOTICE.ind cause=%u='%s' importance=%u didn't match any ran_peer, ignoring\n", osmo_sccp_addr_dump(&ni->calling_addr), - ni->cause, osmo_sccp_return_cause_name(ni->cause), + ni->cause, osmo_sccp_return_reason_name(ni->cause), ni->importance); return; }
LOG_RAN_PEER(rp, LOGL_NOTICE, "N-NOTICE.ind cause=%u='%s' importance=%u\n", - ni->cause, osmo_sccp_return_cause_name(ni->cause), + ni->cause, osmo_sccp_return_reason_name(ni->cause), ni->importance);
switch (ni->cause) { - case SCCP_RETURN_CAUSE_SUBSYSTEM_CONGESTION: - case SCCP_RETURN_CAUSE_NETWORK_CONGESTION: + case OSMO_SCCP_RETURN_REASON_SUBSYSTEM_CONGESTION: + case OSMO_SCCP_RETURN_REASON_NETWORK_CONGESTION: /* Transient failures (hopefully), keep going. */ return; default: