<p><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743">View Change</a></p><p>6 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c">File src/input/ipaccess.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/libosmo-abis/+/14743/10/src/input/ipaccess.c@74">Patch Set #10, Line 74:</a> <code style="font-family:monospace,monospace">  struct osmo_fsm_inst** ka_fsm;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I don't see a point in using pointers to pointers here simply to have 3 shorter lines which fit anyw […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@130">Patch Set #10, Line 130:</a> <code style="font-family:monospace,monospace">       struct osmo_fsm_inst** ka_fsm;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Again avoid this. If you want, catch any of this in a pointer:  […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done. Thanks for the suggestion with the macro; but now that the cleanup function exists, it doesn't even seem necessary.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@262">Patch Set #10, Line 262:</a> <code style="font-family:monospace,monospace">                       ka_fsm = &ipaccess_line_ts(newbfd, new_line)->driver.ipaccess.ka_fsm;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This chunk is mostly copied from the OML part above. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@304">Patch Set #10, Line 304:</a> <code style="font-family:monospace,monospace">     struct osmo_fsm_inst** ka_fsm = &ipaccess_line_ts(bfd, line)->driver.ipaccess.ka_fsm;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Same, avoid pointers to pointers for this kind of use.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@1045">Patch Set #10, Line 1045:</a> <code style="font-family:monospace,monospace">               if (line->ipa_kap) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I see this chunk of code again and again. I'm sure it can go into a function.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Moved to new function ipaccess_keepalive_fsm_cleanup()... then realized later that you didn't mean the cleanup code above, but the part below. It doesn't hurt to have the cleanup code in a function though, it is used 4 times and saves a few lines.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Moved the conn_alloc_keepalive_fsm related code to new functions:</p><ul><li>ipaccess_bsc_keepalive_fsm_alloc</li><li>ipaccess_bts_keepalive_fsm_alloc</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">(I had it in one function first, but with the differences in callbacks and alloc arguments, two functions seem more readable.)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@1111">Patch Set #10, Line 1111:</a> <code style="font-family:monospace,monospace">  if (line->ipa_kap) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Same chunk of code again.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743">change 14743</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/libosmo-abis/+/14743"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-abis </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I30e3bd601e55355aaf738ee2f2c44c1ec2c46c6a </div>
<div style="display:none"> Gerrit-Change-Number: 14743 </div>
<div style="display:none"> Gerrit-PatchSet: 11 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Assignee: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 22 Jan 2020 14:47:08 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>