pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/43808?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.
Related: OS#2601 Change-Id: I38c218f4595af0be9a17cff436b2beaabd6f8487 --- M TODO-RELEASE M src/osmo-hnbgw/hnbgw_sccp.c 2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/08/43808/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/osmo-hnbgw/hnbgw_sccp.c b/src/osmo-hnbgw/hnbgw_sccp.c index 2e9b79a..2e97269 100644 --- a/src/osmo-hnbgw/hnbgw_sccp.c +++ b/src/osmo-hnbgw/hnbgw_sccp.c @@ -32,7 +32,6 @@ #include <osmocom/sigtran/sccp_sap.h> #include <osmocom/sigtran/sccp_helpers.h> #include <osmocom/sigtran/protocol/sua.h> -#include <osmocom/sccp/sccp_types.h>
#include <osmocom/hnbgw/hnbgw_cn.h> #include <osmocom/hnbgw/context_map.h> @@ -122,18 +121,18 @@ if (!cnlink) { LOGP(DCN, LOGL_DEBUG, "(calling_addr=%s) N-NOTICE.ind cause=%u='%s' importance=%u didn't match any cnlink, ignoring\n", osmo_sccp_addr_dump(¶m->calling_addr), - param->cause, osmo_sccp_return_cause_name(param->cause), + param->cause, osmo_sccp_return_reason_name(param->cause), param->importance); return; }
LOG_CNLINK(cnlink, DCN, LOGL_NOTICE, "N-NOTICE.ind cause=%u='%s' importance=%u\n", - param->cause, osmo_sccp_return_cause_name(param->cause), + param->cause, osmo_sccp_return_reason_name(param->cause), param->importance); CNLINK_CTR_INC(cnlink, CNLINK_CTR_SCCP_N_NOTICE_IND); switch (param->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: