Change in osmo-msc[master]: fix regression: mgcp FSM: accept Assignment Complete early

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
Tue Dec 11 17:26:11 UTC 2018


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


Change subject: fix regression: mgcp FSM: accept Assignment Complete early
......................................................................

fix regression: mgcp FSM: accept Assignment Complete early

In recent commit [1] I broke the flow of Assignment Complete arriving before in
ST_MDCX_RAN state, because I changed a simple event omission into a failure.
Revert that bit and explain.

There was a previous comment that should have made me understand, now trying
with a bit of rewording in the hope that it might become more clear.

[1] commit 212c0c9bdaf1166e3bcbab85f3ab31dc17162f5b
    "move ASS-COMPL MGCP handling out of a_iface_bssap.c"
    Change-Id I8137215c443239bddf3e69b5715839a365b73b6c

Change-Id: Ic0abdc51b82b0e924b2561582310a83528fd1880
---
M src/libmsc/msc_mgcp.c
1 file changed, 7 insertions(+), 5 deletions(-)



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

diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index 7aeab4a..cce1175 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -1079,11 +1079,6 @@
 
 	fi = mgcp_ctx->fsm;
 
-	if (fi->state != ST_MDCX_RAN) {
-		LOGPFSML(fi, LOGL_ERROR, "Assignment Complete not allowed in this state\n");
-		return -ENOTSUP;
-	}
-
 	/* use address / port supplied with the AoIP transport address element */
 	if (aoip_transport_addr->ss_family != AF_INET) {
 		LOGPCONN(conn, LOGL_ERROR, "Assignment Complete: Unsupported addressing scheme (only IPV4 supported)\n");
@@ -1109,6 +1104,13 @@
 
 	LOGPCONN(conn, LOGL_DEBUG, "Assignment Complete: rtp %s:%u\n", addr, port);
 
+	/* If the Assignment Complete arrives early, before reaching ST_MDCX_RAN, no event is needed, because we're
+	 * still waiting for other events first. We will later on detect that the Assignment has already concluded. */
+	if (fi->state != ST_MDCX_RAN) {
+		LOGPCONN(conn, LOGL_DEBUG, "Not yet in ST_MDCX_RAN, no need to dispatch EV_ASSIGN event\n");
+		return 0;
+	}
+
 	return osmo_fsm_inst_dispatch(fi, EV_ASSIGN, mgcp_ctx);
 }
 

-- 
To view, visit https://gerrit.osmocom.org/12257
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: Ic0abdc51b82b0e924b2561582310a83528fd1880
Gerrit-Change-Number: 12257
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/20181211/51b72849/attachment.htm>


More information about the gerrit-log mailing list