<p style="white-space: pre-wrap; word-wrap: break-word;">thanks for the review comments. I really think we should do something about the trunk_nr:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">#define LOGPTRUNK(trunk, cat, level, fmt, args...) \<br>LOGP(cat, level, "trunk:%u " fmt, \  <============ %u (!)<br>     trunk ? trunk->trunk_nr : 0, \<br>     ## args)</pre><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/24942">View Change</a></p><p>3 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/+/24942/4/src/libosmo-mgcp/mgcp_endp.c">File src/libosmo-mgcp/mgcp_endp.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/+/24942/4/src/libosmo-mgcp/mgcp_endp.c@138">Patch Set #4, Line 138:</a> <code style="font-family:monospace,monospace">      if (endp->trunk->stats.common) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">can this be null? does it make sense that it's null?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">There is a problem with the unit-tests. They do not allocate the trunks really, they just create a variable with some endpoints in it, which are also variables. If I don't check, it crashes.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/24942/4/src/libosmo-mgcp/mgcp_ratectr.c">File src/libosmo-mgcp/mgcp_ratectr.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/+/24942/4/src/libosmo-mgcp/mgcp_ratectr.c@257">Patch Set #4, Line 257:</a> <code style="font-family:monospace,monospace">                                   "Number of endpoints that exist on the trunk",</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">string not aligned to above line</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/+/24942/4/src/libosmo-mgcp/mgcp_ratectr.c@285">Patch Set #4, Line 285:</a> <code style="font-family:monospace,monospace">      snprintf(stat_name, sizeof(stat_name), "%s-%d:common", mgcp_trunk_type_strs_str(trunk->trunk_type),</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">is trunk_nr an int?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I also don't understand why, I should check this back and refactor it too (if possible) - but it would be easier if we could do this in a follow up patch.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/24942">change 24942</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/+/24942"/><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: Ib7b654168dc3512f55e45cc4755dc1f6f423d023 </div>
<div style="display:none"> Gerrit-Change-Number: 24942 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </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: Mon, 19 Jul 2021 10:01:37 +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>