<p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513">View Change</a></p><p>14 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c">File src/common/abis.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/osmo-bts/+/24513/5/src/common/abis.c@66">Patch Set #5, Line 66:</a> <code style="font-family:monospace,monospace"> ABIS_LINK_ST_CONN,</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">CONN means CONNECTED here? CONNECTING? Most probably needs to be changed to some of those, it's not clear at first sight.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@67">Patch Set #5, Line 67:</a> <code style="font-family:monospace,monospace">   ABIS_LINK_ST_FAIL,</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">state is FAILED right? FAIL it's more like an event or action.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@87">Patch Set #5, Line 87:</a> <code style="font-family:monospace,monospace">static void abis_link_conn_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">we usually don't use "_action" suffix, only the name. Changing state name to something more meaningful may help here.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@144">Patch Set #5, Line 144:</a> <code style="font-family:monospace,monospace">            /* In some implementations the user may specify a BSC host via commandline switch. If this is the case</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(doesn't look clear to me to take cmdline related specialties here, but OK)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@148">Patch Set #5, Line 148:</a> <code style="font-family:monospace,monospace">   } else if ((struct llist_head *)priv->bsc_oml_host != (struct llist_head *)&bts->bsc_oml_hosts.next) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">llist_first(&bts->bsc_oml_hosts)? Or do you actually mean the end of the list? isn't that "previous"?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@149">Patch Set #5, Line 149:</a> <code style="font-family:monospace,monospace">              /* Get a BSC host from the list and move the list heade one position forward. */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">type: header</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@153">Patch Set #5, Line 153:</a> <code style="font-family:monospace,monospace">    } else {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">maybe moving this early termiantion above (if condition) would help making the function a bit less complex</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@163">Patch Set #5, Line 163:</a> <code style="font-family:monospace,monospace">      osmo_get_macaddr(bts_dev_info.mac_addr, "eth0");</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">what is this? hardcoded eth0? this looks wrong</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@172">Patch Set #5, Line 172:</a> <code style="font-family:monospace,monospace">        if (line) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">drop {}</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@176">Patch Set #5, Line 176:</a> <code style="font-family:monospace,monospace">      priv->line_ctr++;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">not sure what this is about</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@206">Patch Set #5, Line 206:</a> <code style="font-family:monospace,monospace">                        .name = "CONN",</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">CONNECTING</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/abis.c@207">Patch Set #5, Line 207:</a> <code style="font-family:monospace,monospace">                             .in_event_mask = 0 | S(ABIS_LINK_EV_SIGN_LINK_DOWN)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">this 0| can be dropped</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/main.c">File src/common/main.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/osmo-bts/+/24513/5/src/common/main.c@399">Patch Set #5, Line 399:</a> <code style="font-family:monospace,monospace">     if (llist_count(&g_bts->bsc_oml_hosts) == 0) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">what about the cmdline oml ip I saw in the fsm which was outisde the llist?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513/5/src/common/vty.c">File src/common/vty.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/osmo-bts/+/24513/5/src/common/vty.c@536">Patch Set #5, Line 536:</a> <code style="font-family:monospace,monospace">{</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">iirc you are maintaining a pointer to the currently "connecting" remote ip. If you remove it through this VTY cmd, when the conn fails it will try to access the already freed pointer.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/24513">change 24513</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-bts/+/24513"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I205f68a3a7f35fee4c38a7cfba2b014237df2727 </div>
<div style="display:none"> Gerrit-Change-Number: 24513 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@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-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 28 Jun 2021 15:35:30 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>