<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 6:</p><p style="white-space: pre-wrap; word-wrap: break-word;">(2 comments)</p></blockquote><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18752">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18752/5/src/libosmo-mgcp/mgcp_trunk.c">File src/libosmo-mgcp/mgcp_trunk.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18752/5/src/libosmo-mgcp/mgcp_trunk.c@142">Patch Set #5, Line 142:</a> <code style="font-family:monospace,monospace">         if (errno == ERANGE || trunk_nr > 64 || trunk_nr == 0)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I recommended checking existing uses of strtoul in osmo-mgw since correctness checking is a bit tric […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I did, I hope its now better. Why (errno == ERANGE && pt == ULONG_MAX), is it not enough it errno is at ERANGE?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18752/5/src/libosmo-mgcp/mgcp_trunk.c@142">Patch Set #5, Line 142:</a> <code style="font-family:monospace,monospace">          if (errno == ERANGE || trunk_nr > 64 || trunk_nr == 0)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I recommended checking existing uses of strtoul in osmo-mgw since correctness checking is a bit tric […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18752/6/src/libosmo-mgcp/mgcp_trunk.c">File src/libosmo-mgcp/mgcp_trunk.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18752/6/src/libosmo-mgcp/mgcp_trunk.c@142">Patch Set #6, Line 142:</a> <code style="font-family:monospace,monospace">          trunk_nr = strtoul(epname + prefix_len, &str_trunk_nr_end, 10);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">you are missing setting errno = 0 prior to calling it.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18752/6/src/libosmo-mgcp/mgcp_trunk.c@143">Patch Set #6, Line 143:</a> <code style="font-family:monospace,monospace">               if (errno == ERANGE || trunk_nr > 64 || trunk_nr == 0</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">if ((errno == ERANGE && pt == ULONG_MAX) || (errno && !trunk_nr) || […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">yes, this is expected. The trunk numbers are not freely assignable. Trunk 0 is bound to the virtual trunk. 1-64 can be E1 trunks. (I am not happy yet with the method how the trunk gets resolved, especially the exception below is a mess.)</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18752">change 18752</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-mgw/+/18752"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ifdaab953544151e73b58cc3e95d21afdb40765f4 </div>
<div style="display:none"> Gerrit-Change-Number: 18752 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 22 Jun 2020 13:16:00 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>