<p><a href="https://gerrit.osmocom.org/11993">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/11993/1//COMMIT_MSG">Commit Message:</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/11993/1//COMMIT_MSG@23">Patch Set #1, Line 23:</a> <code style="font-family:monospace,monospace">20181128193707330 DAS <0012> fsm.c:381 assignment(conn4_0-0-6-TCH_F_PDCHasPDCH-0)[0x6120000024a0]{WAIT_LCHAN_ACTIVE}: Deallocated</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">you *could* make this a bit more readable next time :)</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">My bad, I kept using same steps as in previous commits, but I was already using another BSC binary compiled which outputs tese long file paths. I'll fix it in next version of the patch.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/11993/1/src/osmo-bsc/lchan_rtp_fsm.c">File src/osmo-bsc/lchan_rtp_fsm.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/11993/1/src/osmo-bsc/lchan_rtp_fsm.c@a742">Patch Set #1, Line 742:</a> <code style="font-family:monospace,monospace"></code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">while it is true that this is normally a duplicate event, it does make sure that in case the RTP hit […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not sure yo get your point ntirely, let's see if I understand (after looking at the code again).</p><p style="white-space: pre-wrap; word-wrap: break-word;">See _osmo_fsm_inst_term in fsm.c, in here we can see how the code path goes:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">"""<br>       /* delete ourselves from the parent */<br>        parent = fi->proc.parent;<br>  if (parent) {<br>         LOGPFSMSRC(fi, file, line, "Removing from parent %s\n",<br>                        osmo_fsm_inst_name(parent));<br>               llist_del(&fi->proc.child);<br>    }</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">     /* call destructor / clean-up function */<br>     if (fi->fsm->cleanup)<br>           fi->fsm->cleanup(fi, cause);</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">    LOGPFSMSRC(fi, file, line, "Freeing instance\n");<br>   /* Fetch parent again in case it has changed. */<br>      parent = fi->proc.parent;<br>  osmo_fsm_inst_free(fi);</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">       /* indicate our termination to the parent */<br>  if (parent && cause != OSMO_FSM_TERM_PARENT)<br>          _osmo_fsm_inst_dispatch(parent, parent_term_event, data,<br>                                      file, line);<br>"""</pre><p style="white-space: pre-wrap; word-wrap: break-word;">It's seems quite clear to me that after cleanup it immediatelly follows the osmo_fsm_inst_dispatch(). BUT (I saw that now), only if cause != OSMO_FSM_TERM_PARENT, which means if lchan fsm calls "osmo_fsm_inst_term()", then it will call "osmo_fsm_inst_term_children(fi, OSMO_FSM_TERM_PARENT,...)" and then this one is needed.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So I think instead of dropping it, I should change the if condition to:<br>if (lchan->fi && cause == OSMO_FSM_TERM_PARENT)</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>agree?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/11993">change 11993</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/11993"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: I3e95a21e5a5ec6c35b1ab20b7a642fd7eb81e556 </div>
<div style="display:none"> Gerrit-Change-Number: 11993 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </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>
<div style="display:none"> Gerrit-Comment-Date: Thu, 29 Nov 2018 15:32:11 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>