Change in ...osmo-msc[master]: libmsc/gsm_09_11.c: properly handle OSMO_GSUP_MSGT_PROC_SS_ERROR

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Sun Jun 16 08:40:53 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/14477


Change subject: libmsc/gsm_09_11.c: properly handle OSMO_GSUP_MSGT_PROC_SS_ERROR
......................................................................

libmsc/gsm_09_11.c: properly handle OSMO_GSUP_MSGT_PROC_SS_ERROR

This message can be used by the HLR/EUSE to indicate that something
went wrong, e.g. the connection with EUSE is lost, EUSE or the MS
did not respond in time, etc. OsmoMSC needs to release the SS/USSD
transaction, and send GSM 04.80 RELEASE COMPLETE message to the MS
if there is an active RAN connection.

Change-Id: I076d12ef24d7320eda1df1ee4588da7375ef3d9e
Related: (TTCN-3) I5586a88136c936441a842f49248824680603672e
Related: OS#2931
---
M src/libmsc/gsm_09_11.c
1 file changed, 25 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/14477/1

diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index 3bd90dd..c76d2e8 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -437,14 +437,36 @@
 	/* Associate logging messages with this subscriber */
 	log_set_context(LOG_CTX_VLR_SUBSCR, vsub);
 
+	/* Attempt to find DTAP-transaction */
+	trans = trans_find_by_callref(net, gsup_msg->session_id);
+
 	/* Handle errors */
 	if (OSMO_GSUP_IS_MSGT_ERROR(gsup_msg->message_type)) {
-		/* FIXME: handle this error somehow! */
+		LOGP(DSS, LOGL_NOTICE, "Rx %s from HLR/EUSE (cause=0x%02x, sid=0x%x)\n",
+		     osmo_gsup_message_type_name(gsup_msg->message_type),
+		     gsup_msg->cause, gsup_msg->session_id);
+
+		if (!trans) {
+			LOGP(DSS, LOGL_ERROR, "No transaction found for "
+			     "sid=0x%x, nothing to abort\n", gsup_msg->session_id);
+			return -EAGAIN;
+		}
+
+		LOG_TRANS(trans, LOGL_NOTICE, "Aborting the session: sending RELEASE COMPLETE\n");
+
+		/* Indicate connection release to subscriber (if active) */
+		if (trans->msc_a != NULL) {
+			/* TODO: implement GSUP - GSM 04.80 cause mapping */
+			msc_send_ussd_release_complete_cause(trans->msc_a, trans->transaction_id,
+				GSM48_CAUSE_LOC_PUN_S_LU, GSM48_CC_CAUSE_TEMP_FAILURE);
+		}
+
+		/* Terminate transaction */
+		trans_free(trans);
+
 		return 0;
 	}
 
-	/* Attempt to find DTAP-transaction */
-	trans = trans_find_by_callref(net, gsup_msg->session_id);
 	if (!trans) {
 		/* Count network-initiated attempts to establish a NC SS/USSD session */
 		rate_ctr_inc(&net->msc_ctrs->ctr[MSC_CTR_NC_SS_MT_REQUESTS]);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14477
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I076d12ef24d7320eda1df1ee4588da7375ef3d9e
Gerrit-Change-Number: 14477
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190616/71e023de/attachment.htm>


More information about the gerrit-log mailing list