<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1: Code-Review+1</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not sure if the change to free/re-alloc really is part of the bug fix.  It's more like a genreal polict/strategy change, while the actual fix is the memcpy?</p><p style="white-space: pre-wrap; word-wrap: break-word;">Not trying to be difficult here, but the free/realloc has consequences, like: Are we sure there are no dangling references, ...</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">We store cell information in both the cell struct and the FSM inst (as well as ra_id in the bvc...)</p><p style="white-space: pre-wrap; word-wrap: break-word;">The memcpy updates the cell, but the bvc reset uses the information stored inside the FSM instance. So we need to either:</p><ul><li>free/alloc the whole bvc (as I do now)</li><li>reallocate only the fsm inst</li><li>Add functions to update the cell information inside the bssbp fsm</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">Best would be to consolidate our cell information so everything points to the cell struct (and there is an issue for that), but I see that as a next step.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Wrt. dangling references we already call gbproxy_bvc_free() when the SGSN nse goes down so I figured there should be limited "surprises".</p><p><a href="https://gerrit.osmocom.org/c/osmo-gbproxy/+/23684">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gbproxy/+/23684">change 23684</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-gbproxy/+/23684"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gbproxy </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia94090a0133340b7b284df6ec5b36546da698b37 </div>
<div style="display:none"> Gerrit-Change-Number: 23684 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 09 Apr 2021 09:20:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>