<p>pespin <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20035">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgw: Fix logic in test TC_two_crcx_mdcx_and_rtp_osmux<br><br>rtpem should be set to BIDIR at the same time where MDCX "sendrecv" is<br>sent, otherwise if MGW sends us RTP packets (because we set the conn to<br>sendrecv) they will be counted incorrectly in<br>stats[0].num_pkts_rx_err_disabled.<br><br>This issue doesn't trigger in current code because the MGW doesn't know<br>anyway the remote IP address of the other connection until an MDCX is<br>sent to it. However, if for whatever reason the IP address is known (for<br>instance because it is set during CRCX, which will be done in next<br>commits), then RTP messages would be sent and the error counter would<br>be > 0.<br><br>Change-Id: I8f2c4e497e522fc17e5cfe76987f802265c486ab<br>---<br>M mgw/MGCP_Test.ttcn<br>1 file changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn</span><br><span>index 429d337..c6fe15b 100644</span><br><span>--- a/mgw/MGCP_Test.ttcn</span><br><span>+++ b/mgw/MGCP_Test.ttcn</span><br><span>@@ -1331,6 +1331,9 @@</span><br><span> </span><br><span>               /* The first leg will now be switched into bidirectional</span><br><span>              * mode, but we do not expect any data comming back yet. */</span><br><span style="color: hsl(120, 100%, 40%);">+           f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);</span><br><span style="color: hsl(120, 100%, 40%);">+             stats_osmux := f_osmuxem_stats_get(OsmuxEM);</span><br><span style="color: hsl(120, 100%, 40%);">+          num_pkts_tx[1] := stats_osmux.num_pkts_tx;</span><br><span>           f_flow_modify(RTPEM[0], ep, call_id, "sendrecv", flow[0]);</span><br><span>                 f_sleep(0.5);</span><br><span>                stats_rtp := f_rtpem_stats_get(RTPEM[0]);</span><br><span>@@ -1347,12 +1350,9 @@</span><br><span>           /* When the second leg is switched into bidirectional mode</span><br><span>            * as well, then the MGW will connect the two together and</span><br><span>            * we should see RTP streams passing through from both ends. */</span><br><span style="color: hsl(0, 100%, 40%);">-         f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);</span><br><span>            f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_BIDIR);</span><br><span>                 stats_rtp := f_rtpem_stats_get(RTPEM[0]);</span><br><span style="color: hsl(0, 100%, 40%);">-               num_pkts_tx[0] := stats_rtp.num_pkts_tx</span><br><span style="color: hsl(0, 100%, 40%);">-         stats_osmux := f_osmuxem_stats_get(OsmuxEM);</span><br><span style="color: hsl(0, 100%, 40%);">-            num_pkts_tx[1] := stats_osmux.num_pkts_tx</span><br><span style="color: hsl(120, 100%, 40%);">+             num_pkts_tx[0] := stats_rtp.num_pkts_tx;</span><br><span> </span><br><span>                 if (crcx_osmux_wildcard) {</span><br><span>                   /* For now we must set same CID as the MGW recvCID,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20035">change 20035</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/+/20035"/><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: I8f2c4e497e522fc17e5cfe76987f802265c486ab </div>
<div style="display:none"> Gerrit-Change-Number: 20035 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>