<p style="white-space: pre-wrap; word-wrap: break-word;">This change is ready for review.</p><p>Patch set 5:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18881">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/+/18881/5/include/osmocom/mgcp_client/mgcp_client_internal.h">File include/osmocom/mgcp_client/mgcp_client_internal.h:</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/+/18881/5/include/osmocom/mgcp_client/mgcp_client_internal.h@6">Patch Set #5, Line 6:</a> <code style="font-family:monospace,monospace">#define MSGB_CB_MGCP_TRANS_ID       0</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(by modifying the ws here it looks like that const is involved in the patch... rather just use a space in both?)</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18881/5/src/libosmo-mgcp-client/mgcp_client.c">File src/libosmo-mgcp-client/mgcp_client.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/+/18881/5/src/libosmo-mgcp-client/mgcp_client.c@1002">Patch Set #5, Line 1002:</a> <code style="font-family:monospace,monospace">int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm sorry to dampen yet again, but seeing this now seems like the problem is in the caller of this API: it looks like osmo-bsc fails to call mgcp_client_cancel() in some situation, and the timeout or teardown should happen in osmo-bsc?</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm particularly 'worried' about that comment saying "the FSM likely already terminated, thus we don't call osmo_fsm_inst_term()" -- that sounds like one of those gordian knots of solving proper cleanup across several FSMs, and that this patch is inviting trouble.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'll have to take a closer look at this before I can say for sure.<br>Would be good to know if you have more information about how the memleak situation is caused, if you have any, to identify the code path in osmo-bsc that might fail to call mgcp_client_cancel().</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/18881">change 18881</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/+/18881"/><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: Ia2e89f31685a0822e5cb147a06cc1fc68efc1ec4 </div>
<div style="display:none"> Gerrit-Change-Number: 18881 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 18 Jun 2020 16:08:41 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>