[PATCH] osmo-msc[master]: libmsc: Pretend MNCC requested release in handle_error()

daniel gerrit-no-reply at lists.osmocom.org
Thu Feb 15 16:53:47 UTC 2018


Review at  https://gerrit.osmocom.org/6505

libmsc: Pretend MNCC requested release in handle_error()

Send a release request to the MS so the connection does not stay open
indefinitely.

Change-Id: I7669d29cf5be3e4a60a1d121edbfcf9056f6d82b
---
M src/libmsc/msc_mgcp.c
1 file changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index 08aa09a..2bc186e 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -145,6 +145,15 @@
 			  const char *file, int line)
 {
 	struct osmo_fsm_inst *fi;
+	struct gsm_mncc mncc = {
+		.msg_type = MNCC_REL_REQ,
+		.callref = mgcp_ctx->trans->callref,
+		.cause = {
+			.location = GSM48_CAUSE_LOC_PRN_S_LU,
+			.coding = 0, /* FIXME */
+			.value = GSM48_CC_CAUSE_RESOURCE_UNAVAIL
+		}
+	};
 
 	OSMO_ASSERT(mgcp_ctx);
 	fi = mgcp_ctx->fsm;
@@ -159,6 +168,8 @@
 	/* Simulate the call end by sending a teardown event, so that
 	 * the FSM proceeds directly with the DLCX */
 	osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN_ERROR, mgcp_ctx);
+
+	mncc_tx_to_cc(mgcp_ctx->trans->net, MNCC_REL_REQ, &mncc);
 }
 
 /* Timer callback to shut down in case of connectivity problems */

-- 
To view, visit https://gerrit.osmocom.org/6505
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7669d29cf5be3e4a60a1d121edbfcf9056f6d82b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: daniel <dwillmann at sysmocom.de>


More information about the gerrit-log mailing list