<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11312">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lchan_fsm: fix failure handling: notify conn when released<br><br>Usually, conn->lchan is set to NULL before/upon releasing it. However, if the<br>lchan is still associated with a conn upon/after release, make sure the conn<br>realizes it has no lchan and sends a BSSMAP Clear Request to the MSC.<br><br>lchan_reset() is the last step before an lchan is fully unused. In there, make<br>sure to notify any conn that might still be associated, with<br>gscon_forget_lchan().<br><br>lchan_cleanup() does the same, but in fact this is only called when an lchan is<br>*deallocated*, but instead it usually merely goes to the UNUSED state.<br><br>It may make sense to call gscon_forget_lchan() sooner, e.g. when entering a<br>releasing state. This here nevertheless is a final safeguard.<br><br>Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154<br>Change-Id: I88337a18246c44ba48da64bb611a3cbb647a750e<br>---<br>M src/osmo-bsc/lchan_fsm.c<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c</span><br><span>index 4aaedde..9f2d6c3 100644</span><br><span>--- a/src/osmo-bsc/lchan_fsm.c</span><br><span>+++ b/src/osmo-bsc/lchan_fsm.c</span><br><span>@@ -368,6 +368,9 @@</span><br><span> {</span><br><span>  LOG_LCHAN(lchan, LOGL_DEBUG, "Clearing lchan state\n");</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (lchan->conn)</span><br><span style="color: hsl(120, 100%, 40%);">+           gscon_forget_lchan(lchan->conn, lchan);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         if (lchan->rqd_ref) {</span><br><span>             talloc_free(lchan->rqd_ref);</span><br><span>              lchan->rqd_ref = NULL;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11312">change 11312</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/11312"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I88337a18246c44ba48da64bb611a3cbb647a750e </div>
<div style="display:none"> Gerrit-Change-Number: 11312 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>