<p><a href="https://gerrit.osmocom.org/13837">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13837/1/openbsc/src/osmo-bsc_nat/bsc_nat.c">File openbsc/src/osmo-bsc_nat/bsc_nat.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/13837/1/openbsc/src/osmo-bsc_nat/bsc_nat.c@1284">Patch Set #1, Line 1284:</a> <code style="font-family:monospace,monospace">   </code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">What happens if we change the order of the two calls? […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Which two calls do you mean? talloc_free(parsed) and queue_for_msc()? Good point, that would work too and it'd be more simple, I'll change the commit. I'll still leave the return type in queue_for_msc since it can be helpful for later.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Regarding parsed allocation, I think the best would actually be simplifying the code by having parsed allocated in the stack and have<br>"""int bsc_nat_parse(struct msgb *msg, struct bsc_nat_parsed *parsed)"""<br>instead of <br>"""struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg)"""<br>I can submit a commit as a follow-up to this one doing so.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13837">change 13837</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/13837"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: openbsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 </div>
<div style="display:none"> Gerrit-Change-Number: 13837 </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: Daniel Willmann <dwillmann@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: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Holger Freyther <holger@freyther.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 02 May 2019 09:01:34 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>