<p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/24823">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/osmo-mgw/+/24823/2/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/+/24823/2/src/libosmo-mgcp/mgcp_protocol.c@1278">Patch Set #2, Line 1278:</a> <code style="font-family:monospace,monospace"> if (!endp->wildcarded_req && llist_count(&endp->conns) <= 0) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">how can llist_count return < 0? I don't think it can. Morevoer, I guess you want to check if the list is not empty, so use !llist_empty() which doesn't iterate over the whole list like llist_count does.</p><p style="white-space: pre-wrap; word-wrap: break-word;">EDIT: I see it comes from existing code. However it may make sense to do the changes I mentioned as a separate commit perhaps.</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/+/24823/2/src/libosmo-mgcp/mgcp_protocol.c@1350">Patch Set #2, Line 1350:</a> <code style="font-family:monospace,monospace">              return create_ok_response(endp, 200, "DLCX", p->trans);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">isn't endp released already in here since you released all the endpoints in the loop above?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/24823">change 24823</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/+/24823"/><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: I0770cf46d93ab09efe9cafdd56d2e3f1132db189 </div>
<div style="display:none"> Gerrit-Change-Number: 24823 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </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, 02 Jul 2021 15:19:27 +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>