<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/12257">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fix regression: mgcp FSM: accept Assignment Complete early<br><br>In recent commit [1] I broke the flow of Assignment Complete arriving before in<br>ST_MDCX_RAN state, because I changed a simple event omission into a failure.<br>Revert that bit and explain.<br><br>There was a previous comment that should have made me understand, now trying<br>with a bit of rewording in the hope that it might become more clear.<br><br>[1] commit 212c0c9bdaf1166e3bcbab85f3ab31dc17162f5b<br>    "move ASS-COMPL MGCP handling out of a_iface_bssap.c"<br>    Change-Id I8137215c443239bddf3e69b5715839a365b73b6c<br><br>Change-Id: Ic0abdc51b82b0e924b2561582310a83528fd1880<br>---<br>M src/libmsc/msc_mgcp.c<br>1 file changed, 7 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/57/12257/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c</span><br><span>index 7aeab4a..cce1175 100644</span><br><span>--- a/src/libmsc/msc_mgcp.c</span><br><span>+++ b/src/libmsc/msc_mgcp.c</span><br><span>@@ -1079,11 +1079,6 @@</span><br><span> </span><br><span>        fi = mgcp_ctx->fsm;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-      if (fi->state != ST_MDCX_RAN) {</span><br><span style="color: hsl(0, 100%, 40%);">-              LOGPFSML(fi, LOGL_ERROR, "Assignment Complete not allowed in this state\n");</span><br><span style="color: hsl(0, 100%, 40%);">-          return -ENOTSUP;</span><br><span style="color: hsl(0, 100%, 40%);">-        }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>    /* use address / port supplied with the AoIP transport address element */</span><br><span>    if (aoip_transport_addr->ss_family != AF_INET) {</span><br><span>          LOGPCONN(conn, LOGL_ERROR, "Assignment Complete: Unsupported addressing scheme (only IPV4 supported)\n");</span><br><span>@@ -1109,6 +1104,13 @@</span><br><span> </span><br><span>     LOGPCONN(conn, LOGL_DEBUG, "Assignment Complete: rtp %s:%u\n", addr, port);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     /* If the Assignment Complete arrives early, before reaching ST_MDCX_RAN, no event is needed, because we're</span><br><span style="color: hsl(120, 100%, 40%);">+        * still waiting for other events first. We will later on detect that the Assignment has already concluded. */</span><br><span style="color: hsl(120, 100%, 40%);">+        if (fi->state != ST_MDCX_RAN) {</span><br><span style="color: hsl(120, 100%, 40%);">+            LOGPCONN(conn, LOGL_DEBUG, "Not yet in ST_MDCX_RAN, no need to dispatch EV_ASSIGN event\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  return osmo_fsm_inst_dispatch(fi, EV_ASSIGN, mgcp_ctx);</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12257">change 12257</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12257"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic0abdc51b82b0e924b2561582310a83528fd1880 </div>
<div style="display:none"> Gerrit-Change-Number: 12257 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>