<p><a href="https://gerrit.osmocom.org/c/osmo-sip-connector/+/14997">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/14997/1/src/mncc.c">File src/mncc.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/14997/1/src/mncc.c@191">Patch Set #1, Line 191:</a> <code style="font-family:monospace,monospace">     struct in_addr net = { .s_addr = other->ip };</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Yes, mncc.ip is in host byte order, if that's the correct terminology. certainly, using mncc. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Well, according to existing code [mncc.ip = htonl(other->ip)], other->ip is host byte order, and mncc.ip is network byte order. And afar the struct in_addr net expects to have content in net byte order.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So if I'm not wrong, either use "struct in_addr net = { .s_addr = mncc.ip };" or function above should be ntohl() instead of htonl().</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/14997/1/src/mncc.c@192">Patch Set #1, Line 192:</a> <code style="font-family:monospace,monospace">   LOGP(DMNCC, LOGL_DEBUG, "SEND rtp_connect: IP=(%s) PORT=(%u)\n", inet_ntoa(net), mncc.port);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">There are other places in the code that use inet_ntoa() […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Having inet_ntoa already in some places in code doesn't mean we should keep adding references to it. Using inet_ntop() doesn't imply a big change, it's mostly declaring a local buffer in the stack + using the new function, so let's use proper functions before merging since it's not a lot of extra hassle.</p><p style="white-space: pre-wrap; word-wrap: break-word;">man inet_ntop: "inet_ntop() extends the inet_ntoa(3) function to support multiple address families, inet_ntoa(3) is now considered to  be  deprecated  in  favor  of inet_ntop()."</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sip-connector/+/14997">change 14997</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-sip-connector/+/14997"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sip-connector </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2620cce245be199d849d8fad3fc998c96c243f6b </div>
<div style="display:none"> Gerrit-Change-Number: 14997 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 06 Aug 2019 08:10:18 +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"> Comment-In-Reply-To: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>