<p>Kevin Harwell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8691">View Change</a></p><p>Patch set 5:</p><p>(2 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8691/5/lib/python/asterisk/utils_socket.py">File lib/python/asterisk/utils_socket.py:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8691/5/lib/python/asterisk/utils_socket.py@233">Patch Set #5, Line 233:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">range(port[0] + 1, port[0] + span +<br> step, step)<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Wouldn't this path still be taken if span is 0? There aren't any checks for</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">It's possible. That path will be taken if both port and span are zero. If port is zero then a random unused one is first chosen by the OS. Then we want to check if any "span" ports are available too.</p><p style="white-space: pre-wrap; word-wrap: break-word;">It does add +1 here as I was initially not including the primary port in the "span" count. However, after discussing with Corey a bit I'm going to change it to be inclusive.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Also, you are correct that the documentation is wrong. That should be port not span.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8691/5/lib/python/asterisk/utils_socket.py@259">Patch Set #5, Line 259:</a> <code style="font-family:monospace,monospace"> res = self.get_spanned(host, port, socktype, family, span, attempts)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Just for an early return to not have to call reserve, but this is just a sm</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm fixing it os non available ones will now throw an exception instead of returning an empty list.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8691">change 8691</a>. To unsubscribe, 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/8691"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I3da461123afc30e1f5ca12e65d289eaa42d6de00 </div>
<div style="display:none"> Gerrit-Change-Number: 8691 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 19 Apr 2018 18:44:12 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>