<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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">why doing this? it could be that trans was parsed correctly? or we don't use it anyway?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">It is not used, I have oriented myself on the code that was already there. I think the reason why we reset the parameters on failure is historical. In any case, if parsing fails we don't care what the trans was and start over. So I think its better we remove this part.</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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">ERROR? that's expected depending on message type right? print this conditionally based on req. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I have set the log level to ERROR but you are possibly right, its not an error. However, it is an error about to happen...</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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Same, this is not necessarily a failure right?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">yes and no, if the trunk is not overloaded or the request has a wrong endpoint name, then it is definitely an error. If the trunk is overloaded and the endpoint name is wild carded, we won't get an endpoint, but a DLCX would still be able to execute under those condition. In any case, it is not normal that we are able to resolve a trunk without getting an endpoint. If that happens the situation is already erroneous and the request handler must somehow recover from that (if it can).</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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">rc is always 0 here?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">in this case not 0, it still contains the cause code from mgcp_endp_by_name(). I have reorganized the code a bit so that it stores rc earlier in rq.mgcp_cause. Its probably more clear then.</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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">so transactions without endpoint cannot be repeated? because they are under the "rq. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">that is correct. Its also so that the repetition only makes sense when a specific endpoint is addressed. For wild carded requests this feature is of minor importance I think. This is probably a quirk, however the only solution would be to manage the transactions in a different location. Or search all endpoints for that specific transaction ID. In any case, this would be a different topic/patch anyway.</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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">what about having "name" field be a char[4+1] and copy the first bytes of msgb in there? Looks more  […]</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/+/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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">NOTICE here looks a level too high. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</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: 4 </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: Fri, 16 Jul 2021 08:10:52 +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>