[S] Change in osmo-bsc[master]: sigtran: N-NOTICE.ind: Use proper SCCP-User return reason
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/43807?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: I4b412dcc95df6566a3ec1bb91fa93b4115406b0f Related: OS#2601 --- M TODO-RELEASE M src/osmo-bsc/lb.c M src/osmo-bsc/osmo_bsc_sigtran.c 3 files changed, 10 insertions(+), 12 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index b6d61b1..510eed7 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,4 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # 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_REL_REASON_NSU_*, +libosmo-sigtran >2.3.0 OSMO_SCCP_RETURN_REASON_*, osmo_sccp_return_reason_name() diff --git a/src/osmo-bsc/lb.c b/src/osmo-bsc/lb.c index 05a1103..6f79502 100644 --- a/src/osmo-bsc/lb.c +++ b/src/osmo-bsc/lb.c @@ -21,8 +21,6 @@ * */ -#include <osmocom/sccp/sccp_types.h> - #include <osmocom/bsc/lb.h> #include <osmocom/gsm/bssmap_le.h> @@ -162,19 +160,19 @@ if (!smlc) { LOGP(DLCS, LOGL_DEBUG, "(calling_addr=%s) N-NOTICE.ind cause=%u='%s' importance=%u didn't match SMLC, 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 -EINVAL; } LOGP(DLCS, LOGL_NOTICE, "(calling_addr=%s) N-NOTICE.ind cause=%u='%s' importance=%u\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); 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 rc; default: diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index c96aebf..c91b725 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -24,7 +24,6 @@ #include <osmocom/sigtran/sccp_sap.h> #include <osmocom/sigtran/protocol/mtp.h> #include <osmocom/sigtran/mtp_sap.h> -#include <osmocom/sccp/sccp_types.h> #include <osmocom/core/linuxlist.h> #include <osmocom/gsm/gsm0808.h> #include <osmocom/gsm/protocol/ipaccess.h> @@ -160,19 +159,19 @@ if (!msc) { LOGP(DMSC, LOGL_DEBUG, "(calling_addr=%s) N-NOTICE.ind cause=%u='%s' importance=%u didn't match any MSC, 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 rc; } LOG_MSC(msc, LOGL_NOTICE, "(calling_addr=%s) N-NOTICE.ind cause=%u='%s' importance=%u\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); 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 rc; default: -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/43807?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I4b412dcc95df6566a3ec1bb91fa93b4115406b0f Gerrit-Change-Number: 43807 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
pespin