<p>Pau Espin Pedrol <strong>uploaded patch set #4</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/11957">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bsc: Fix lchan iteration for dyn TS during PDCH Deact<br><br>In general PDCH channels are not handled as lchans in BSC (lchan_fsm.c),<br>and so when a TS is in ts->pchan_is=GSM_PCHAN_PDCH, no lchan slot is<br>being used.<br><br>However, during Dynamic TS PDCH Deactivation being in progress (state<br>WAIT_PDCH_DEACT in timeslot_fsm.c), ts->pchan_is =GSM_PCHAN_PDCH, but<br>an lchan slot of that TS is actually already being used by a TCH lchan:<br>it's the one who initiated the deactivate in order to be able to use the TS.<br><br>While being in WAIT_PDCH_DEACT state and receiving a PDCH DEACT NACK,<br>ts_fsm_error() was called in order to kill the TS and it was expected<br>that it would kill any lchan using it (or willing to start using it). In<br>order to do that, it calls ts_lchans_dispatch() which in turns iterates<br>over all lchans attached to the TS using ts_for_each_lchan().<br><br>However, when the NACK arrived we still had ts->pchan_is=GSM_PCHAN_PDCH,<br>ts_for_each_lchan ends up calling<br>ts_as_pchan_for_each_lchan(GSM_PCHAN_PDCH), which in turns calls<br>pchan_subslots(GSM_PCHAN_PDCH) which returns 0, because we don't manage<br>lchans in that mode as explained in first paragraph. This means in this<br>case ts_for_each_lchan() is actually an empty loop while still any of<br>the TCH channels may be in use, and won't be advertised about the TS<br>entering in a broken state.<br><br>As a result, the lchan won't be released for a while, only after T23001<br>expires.<br><br>Related: OS#3708<br>Change-Id: I9cedb77d6578597f1febab36c54b2ee427c7a4a2<br>---<br>M src/osmo-bsc/timeslot_fsm.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/57/11957/4</pre><p>To view, visit <a href="https://gerrit.osmocom.org/11957">change 11957</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/11957"/><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: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I9cedb77d6578597f1febab36c54b2ee427c7a4a2 </div>
<div style="display:none"> Gerrit-Change-Number: 11957 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Assignee: 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>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>