<p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/24941">View Change</a></p><p>7 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/+/24941/1/src/libosmo-mgcp/mgcp_msg.c">File src/libosmo-mgcp/mgcp_msg.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/+/24941/1/src/libosmo-mgcp/mgcp_msg.c@186">Patch Set #1, Line 186:</a> <code style="font-family:monospace,monospace">  pdata->trans = "000000";</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">why doing this? it could be that trans was parsed correctly? or we don't use it anyway?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/24941/1/src/libosmo-mgcp/mgcp_protocol.c">File src/libosmo-mgcp/mgcp_protocol.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/+/24941/1/src/libosmo-mgcp/mgcp_protocol.c@372">Patch Set #1, Line 372:</a> <code style="font-family:monospace,monospace">                LOGP(DLMGCP, LOGL_ERROR,</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">ERROR? that's expected depending on message type right? print this conditionally based on req.require_endp?</p><p style="white-space: pre-wrap; word-wrap: break-word;">EDIT: I see this is already checked further below, so this shouldn't be here afaiu.</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/+/24941/1/src/libosmo-mgcp/mgcp_protocol.c@375">Patch Set #1, Line 375:</a> <code style="font-family:monospace,monospace">                rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_GENERAL_RX_FAIL_NO_ENDPOINT));</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same, this is not necessarily a failure right?</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/+/24941/1/src/libosmo-mgcp/mgcp_protocol.c@386">Patch Set #1, Line 386:</a> <code style="font-family:monospace,monospace">         rq.mgcp_cause = rc;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">rc is always 0 here?</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/+/24941/1/src/libosmo-mgcp/mgcp_protocol.c@392">Patch Set #1, Line 392:</a> <code style="font-family:monospace,monospace">          if (pdata.trans && rq.endp->last_trans && strcmp(rq.endp->last_trans, pdata.trans) == 0) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">so transactions without endpoint cannot be repeated? because they are under the "rq.endp" condition only.</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/+/24941/1/src/libosmo-mgcp/mgcp_protocol.c@400">Patch Set #1, Line 400:</a> <code style="font-family:monospace,monospace">              if (strncmp(mgcp_requests[i].name, rq.name, 4) == 0) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">what about having "name" field be a char[4+1] and copy the first bytes of msgb in there? Looks more safe since you are also passing the pointer in several places and printing it and may be non-null terminated?</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/+/24941/1/src/libosmo-mgcp/mgcp_protocol.c@413">Patch Set #1, Line 413:</a> <code style="font-family:monospace,monospace">                                     "%s: executing request handler \"%s\" for endpoint resource \"%s\"\n", rq.name,</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">NOTICE here looks a level too high. INFO?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/24941">change 24941</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/+/24941"/><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: I9f519d8a0ee8a513fa1e74acf3ee7dbc0991cdde </div>
<div style="display:none"> Gerrit-Change-Number: 24941 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </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-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 14 Jul 2021 16:37:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>