<p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/13196">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/13196/1/src/input/ipa_keepalive.c">File src/input/ipa_keepalive.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/13196/1/src/input/ipa_keepalive.c@132">Patch Set #1, Line 132:</a> <code style="font-family:monospace,monospace">     case 1:</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">would be perhaps nice to have an enum for T 1 and 2, so it's more descriptive: enum ipa_ka_fsm_timer { T_SEND_ANOTHER_PING = 1, T_PONG_NOT_RECEVIED };</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13196/1/src/input/ipa_keepalive.c@138">Patch Set #1, Line 138:</a> <code style="font-family:monospace,monospace">                if (ifp->srv_conn)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Can probably expressed in one line: <br>conn = ifp->srv_conn ? : ifp->client_conn;</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13196/1/src/input/ipa_keepalive.c@213">Patch Set #1, Line 213:</a> <code style="font-family:monospace,monospace">      fi = osmo_fsm_inst_alloc(&ipa_keepalive_fsm, ctx, NULL, LOGL_DEBUG, id);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Let's merge both ipa_client and ipa_server into a static function for which you pass void* ctx, then, client or server ones are basically:</p><p style="white-space: pre-wrap; word-wrap: break-word;">{<br>fi = the_static_function(client, params,id);<br>((*ipa_fsm_priv)(fi->priv))->client_conn = client;<br>return fi;<br>}</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13196/1/src/input/ipa_keepalive.c@263">Patch Set #1, Line 263:</a> <code style="font-family:monospace,monospace">/*! Start the ping/pong procedure of the IPA Keepalive FSM. */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This comment is wrong.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13196/1/src/input/ipa_keepalive.c@270">Patch Set #1, Line 270:</a> <code style="font-family:monospace,monospace">/*! Stop the ping/pong procedure of the IPA Keepalive FSM. */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">typo: Stop should be start.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13196/1/src/input/ipa_keepalive.c@277">Patch Set #1, Line 277:</a> <code style="font-family:monospace,monospace">/*! Inform IPA Keepalive FSM that a PONG has been received. */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">So basically the 3 functions comments are swapped. Good job with the mangling ;)</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13196">change 13196</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/13196"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I2763da49a74de85046ac07d53592c89973314ca6 </div>
<div style="display:none"> Gerrit-Change-Number: 13196 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: 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-Comment-Date: Fri, 08 Mar 2019 18:07:49 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>