Change in osmo-msc[master]: abort assignment on Assignment Failure

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Dec 19 16:07:59 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/12368


Change subject: abort assignment on Assignment Failure
......................................................................

abort assignment on Assignment Failure

If Assignment fails in the BSC, trigger an EV_TEARDOWN_ERROR in the mgcp_ctx
FSM instance, so that the call gets torn down immediately. Before this, the
non-call would idle around without anything happening.

Related: OS#3236
Change-Id: I358cfbaf0f44f25148e8b9bafcb9257b1952b35a
---
M include/osmocom/msc/msc_mgcp.h
M src/libmsc/msc_mgcp.c
M src/libmsc/osmo_msc.c
3 files changed, 21 insertions(+), 1 deletion(-)



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

diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h
index 9d8b01d..fea3434 100644
--- a/include/osmocom/msc/msc_mgcp.h
+++ b/include/osmocom/msc/msc_mgcp.h
@@ -59,5 +59,6 @@
 
 int msc_mgcp_call_assignment(struct gsm_trans *trans);
 int msc_mgcp_ass_complete(struct ran_conn *conn, uint16_t port, char *addr);
+int msc_mgcp_ass_fail(struct ran_conn *conn);
 int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr);
 int msc_mgcp_call_release(struct gsm_trans *trans);
diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index 1ddec08..149100e 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -1072,6 +1072,22 @@
 	return 0;
 }
 
+int msc_mgcp_ass_fail(struct ran_conn *conn)
+{
+	struct mgcp_ctx *mgcp_ctx;
+
+	OSMO_ASSERT(conn);
+
+	mgcp_ctx = conn->rtp.mgcp_ctx;
+	if (!mgcp_ctx)
+		return -EINVAL;
+
+	LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) assignment failed\n", vlr_subscr_name(conn->vsub));
+
+	osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN_ERROR, mgcp_ctx);
+	return 0;
+}
+
 /* Make the connection of a previously assigned call complete
  * Parameter:
  * trans: transaction context.
diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index 37c1d15..a00b445 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -28,6 +28,7 @@
 #include <osmocom/msc/a_iface.h>
 #include <osmocom/msc/gsm_04_08.h>
 #include <osmocom/msc/gsm_04_11.h>
+#include <osmocom/msc/msc_mgcp.h>
 
 #include "../../bscconfig.h"
 #ifdef BUILD_IU
@@ -123,7 +124,9 @@
 /* Receive an ASSIGNMENT FAILURE from BSC */
 void ran_conn_assign_fail(struct ran_conn *conn, uint8_t cause, uint8_t *rr_cause)
 {
-	LOGP(DRR, LOGL_DEBUG, "MSC assign failure (do nothing).\n");
+	LOGP(DRR, LOGL_DEBUG, "MSC Assignment Failure: cause=%u rr_cause=%u.\n",
+	     cause, rr_cause? *rr_cause : 0);
+	msc_mgcp_ass_fail(conn);
 }
 
 /* Receive a CLASSMARK CHANGE from BSC */

-- 
To view, visit https://gerrit.osmocom.org/12368
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I358cfbaf0f44f25148e8b9bafcb9257b1952b35a
Gerrit-Change-Number: 12368
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181219/17b2d788/attachment.htm>


More information about the gerrit-log mailing list