<p>Michael Bradeen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16637">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_rtp: Addressing possible rtp range issues<br><br>res/res_rtp_asterisk.c: Adding 1 to startplace when searching for an<br>open rtp port when the starting port is odd and we choose it.  This<br>prevents choosing a port that is out of range and prevents a possible<br>infinite loop when looking for a free port.<br><br>ASTERISK-27406<br><br>Change-Id: I90f07deef0716da4a30206e9f849458b2dbe346b<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 1 insertion(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/37/16637/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c</span><br><span>index 7b236be..a7a1111 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -3862,6 +3862,7 @@</span><br><span> </span><br><span>        /* Now actually find a free RTP port to use */</span><br><span>       x = (rtpend == rtpstart) ? rtpstart : (ast_random() % (rtpend - rtpstart)) + rtpstart;</span><br><span style="color: hsl(120, 100%, 40%);">+        x = (x == rtpstart && x != (x & ~1)) ? rtpstart + 1 : x;</span><br><span>         x = x & ~1;</span><br><span>      startplace = x;</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16637">change 16637</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.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.asterisk.org/c/asterisk/+/16637"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I90f07deef0716da4a30206e9f849458b2dbe346b </div>
<div style="display:none"> Gerrit-Change-Number: 16637 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Michael Bradeen <mbradeen@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>