<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-trx/+/16875">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lms: Move rx_buffers allocation to constructor<br><br>Release is done in destructor, so let's move allocation to constructor<br>since there's really no need to have them in open() which is already<br>quite complex and large.<br><br>Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066<br>---<br>M Transceiver52M/device/lms/LMSDevice.cpp<br>1 file changed, 5 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/75/16875/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp</span><br><span>index cb0129a..a533e7e 100644</span><br><span>--- a/Transceiver52M/device/lms/LMSDevice.cpp</span><br><span>+++ b/Transceiver52M/device/lms/LMSDevice.cpp</span><br><span>@@ -58,6 +58,11 @@</span><br><span>    tx_gains.resize(chans);</span><br><span> </span><br><span>  rx_buffers.resize(chans);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Set up per-channel Rx timestamp based Ring buffers */</span><br><span style="color: hsl(120, 100%, 40%);">+      for (size_t i = 0; i < rx_buffers.size(); i++)</span><br><span style="color: hsl(120, 100%, 40%);">+             rx_buffers[i] = new smpl_buf(SAMPLE_BUF_SZ / sizeof(uint32_t));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> }</span><br><span> </span><br><span> LMSDevice::~LMSDevice()</span><br><span>@@ -243,10 +248,6 @@</span><br><span>                 goto out_close;</span><br><span>      }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   /* Set up per-channel Rx timestamp based Ring buffers */</span><br><span style="color: hsl(0, 100%, 40%);">-        for (size_t i = 0; i < rx_buffers.size(); i++)</span><br><span style="color: hsl(0, 100%, 40%);">-               rx_buffers[i] = new smpl_buf(SAMPLE_BUF_SZ / sizeof(uint32_t));</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>      return NORMAL;</span><br><span> </span><br><span> out_close:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-trx/+/16875">change 16875</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-trx/+/16875"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-trx </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066 </div>
<div style="display:none"> Gerrit-Change-Number: 16875 </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>