<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/26011">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bsc_subscr_conn_fsm: fix mgw-pool ref counting<br><br>When the gsm_subscr_conn_fsm (GSCO) terminates abormally it might not go<br>through the forget-mgw-endpoint mechanism. It might be terminated<br>forcefully, which means only the pre_term callback runs. The pre_term<br>callback clears the endpoint, but it does not put the mgcp_client<br>reference back into the pool. This results into a wrong ref-count in the<br>mgw-pool.<br><br>Change-Id: I5a7ce6a1880a1060df74d03dd4eb38b51fd85c69<br>Related: SYS#5675<br>---<br>M src/osmo-bsc/bsc_subscr_conn_fsm.c<br>1 file changed, 6 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/11/26011/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>index 1e61d3f..c18079f 100644</span><br><span>--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>@@ -955,8 +955,14 @@</span><br><span> static void gscon_pre_term(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)</span><br><span> {</span><br><span>       struct gsm_subscriber_connection *conn = fi->priv;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct mgcp_client *mgcp_client;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    /* Put MGCP client back into MGW pool */</span><br><span style="color: hsl(120, 100%, 40%);">+      mgcp_client = osmo_mgcpc_ep_client(conn->user_plane.mgw_endpoint);</span><br><span style="color: hsl(120, 100%, 40%);">+ mgcp_client_pool_put(mgcp_client);</span><br><span> </span><br><span>       osmo_mgcpc_ep_clear(conn->user_plane.mgw_endpoint);</span><br><span style="color: hsl(120, 100%, 40%);">+        conn->user_plane.mgw_endpoint = NULL;</span><br><span> </span><br><span>         if (conn->lcls.fi) {</span><br><span>              /* request termination of LCLS FSM */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/26011">change 26011</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-bsc/+/26011"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I5a7ce6a1880a1060df74d03dd4eb38b51fd85c69 </div>
<div style="display:none"> Gerrit-Change-Number: 26011 </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-MessageType: newchange </div>