<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/25517">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trx_if: Allow calling trx_if_flush/close from within TRXC callback<br><br>Change-Id: Ic3baa95ffe4e6ca95c6d02276ea8eb0cb9fa0064<br>---<br>M src/osmo-bts-trx/trx_if.c<br>1 file changed, 7 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/17/25517/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c</span><br><span>index bfeb2ec..687119a 100644</span><br><span>--- a/src/osmo-bts-trx/trx_if.c</span><br><span>+++ b/src/osmo-bts-trx/trx_if.c</span><br><span>@@ -707,6 +707,13 @@</span><br><span> </span><br><span>  rsp.cb = tcm->cb;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+      /* Remove command from list, save it to last_acked and remove previous</span><br><span style="color: hsl(120, 100%, 40%);">+         * last_acked. Do it before calling callback to avoid user freeing tcm</span><br><span style="color: hsl(120, 100%, 40%);">+         * pointer if flushing/closing the iface. */</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_del(&tcm->list);</span><br><span style="color: hsl(120, 100%, 40%);">+ talloc_free(l1h->last_acked);</span><br><span style="color: hsl(120, 100%, 40%);">+      l1h->last_acked = tcm;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* check for response code */</span><br><span>        rc = trx_ctrl_rx_rsp(l1h, &rsp, tcm);</span><br><span>    if (rc == -EINVAL)</span><br><span>@@ -718,11 +725,6 @@</span><br><span>            return 0;</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   /* remove command from list, save it to last_acked and removed previous last_acked */</span><br><span style="color: hsl(0, 100%, 40%);">-   llist_del(&tcm->list);</span><br><span style="color: hsl(0, 100%, 40%);">-   talloc_free(l1h->last_acked);</span><br><span style="color: hsl(0, 100%, 40%);">-        l1h->last_acked = tcm;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>    trx_ctrl_send(l1h);</span><br><span> </span><br><span>      return 0;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/25517">change 25517</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-bts/+/25517"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic3baa95ffe4e6ca95c6d02276ea8eb0cb9fa0064 </div>
<div style="display:none"> Gerrit-Change-Number: 25517 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>