<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18948">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">MSC_ConnectionHandler: fix race condition in f_establish_fully()<br><br>For more details, see I25e10e28de174337233e6a3bb32cc16f2d7d614e.<br><br>Change-Id: Icdb4f2e0edc4cb6e2010a9299331e7e93d0ca007<br>Related: OS#4619<br>---<br>M bsc/MSC_ConnectionHandler.ttcn<br>1 file changed, 12 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/48/18948/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn</span><br><span>index 8ac7051..0d4c81b 100644</span><br><span>--- a/bsc/MSC_ConnectionHandler.ttcn</span><br><span>+++ b/bsc/MSC_ConnectionHandler.ttcn</span><br><span>@@ -801,6 +801,9 @@</span><br><span> </span><br><span>                    /* register our component for this channel number at the RSL Emulation */</span><br><span>                    f_rslem_register(0, new_chan_nr);</span><br><span style="color: hsl(120, 100%, 40%);">+                     /* dispatch queued messages for this channel (if any) */</span><br><span style="color: hsl(120, 100%, 40%);">+                      f_rslem_dchan_queue_dispatch();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>                    var PDU_ML3_MS_NW l3_tx := valueof(ts_RRM_AssignmentComplete('00'O));</span><br><span>                        /* send assignment complete over the new channel */</span><br><span>                  RSL.send(ts_RSL_EST_IND(new_chan_nr, valueof(ts_RslLinkID_DCCH(0)),</span><br><span>@@ -1093,6 +1096,15 @@</span><br><span>                 g_media.mgcp_conn[1].mdcx_seen_exp := 0;</span><br><span>     }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* On receipt of the BSSAP Assignment Command, the IUT (osmo-bsc) will allocate</span><br><span style="color: hsl(120, 100%, 40%);">+        * a channel and send us RR Assignment Command together with ip.access CRCX.</span><br><span style="color: hsl(120, 100%, 40%);">+   * There is a risk that the RSL Emulation component would dequeue and process</span><br><span style="color: hsl(120, 100%, 40%);">+  * ip.access CRCX faster than we process the Assignment Command and register</span><br><span style="color: hsl(120, 100%, 40%);">+   * the corresponding handler for the indicated RSL channel number. This would</span><br><span style="color: hsl(120, 100%, 40%);">+  * result in a failure, because at that moment there will be no handler for</span><br><span style="color: hsl(120, 100%, 40%);">+    * ip.access CRCX. Let's guard against this and enable additional queueing. */</span><br><span style="color: hsl(120, 100%, 40%);">+    f_rslem_dchan_queue_enable();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>      f_create_mgcp_expect(mgcpcrit);</span><br><span>      BSSAP.send(ass_cmd);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18948">change 18948</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/c/osmo-ttcn3-hacks/+/18948"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Icdb4f2e0edc4cb6e2010a9299331e7e93d0ca007 </div>
<div style="display:none"> Gerrit-Change-Number: 18948 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>