<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21501">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">abis_nm: Simplify param passing to abis_nm_rx_get_attr_resp()<br><br>There's no real need to retrieve the trx before passing it to the<br>function, we can do that in the function itself and hence also simplify<br>the function itself.<br><br>Related: OS#4870<br>Change-Id: I7181510c5021ff2712c09ebc6ec8b13fdd8e8dc2<br>---<br>M src/osmo-bsc/abis_nm.c<br>1 file changed, 7 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c</span><br><span>index b64b4dc..9db49b7 100644</span><br><span>--- a/src/osmo-bsc/abis_nm.c</span><br><span>+++ b/src/osmo-bsc/abis_nm.c</span><br><span>@@ -669,15 +669,19 @@</span><br><span> }</span><br><span> </span><br><span> /* Handle 3GPP TS 52.021 ยง8.11.3 Get Attribute Response */</span><br><span style="color: hsl(0, 100%, 40%);">-static int abis_nm_rx_get_attr_resp(struct msgb *mb, const struct gsm_bts_trx *trx)</span><br><span style="color: hsl(120, 100%, 40%);">+static int abis_nm_rx_get_attr_resp(struct msgb *mb)</span><br><span> {</span><br><span>  struct abis_om_hdr *oh = msgb_l2(mb);</span><br><span>        struct abis_om_fom_hdr *foh = msgb_l3(mb);</span><br><span>   struct e1inp_sign_link *sign_link = mb->dst;</span><br><span style="color: hsl(0, 100%, 40%);">- struct gsm_bts *bts = trx ? trx->bts : sign_link->trx->bts;</span><br><span style="color: hsl(120, 100%, 40%);">+  struct gsm_bts *bts = sign_link->trx->bts;</span><br><span style="color: hsl(120, 100%, 40%);">+      const struct gsm_bts_trx *trx;</span><br><span>       struct tlv_parsed tp;</span><br><span>        int rc;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   trx = foh->obj_class == NM_OC_BASEB_TRANSC ?</span><br><span style="color: hsl(120, 100%, 40%);">+               gsm_bts_trx_num(bts, foh->obj_inst.trx_nr) : NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>      DEBUGPFOH(DNM, foh, "Get Attributes Response\n");</span><br><span> </span><br><span>      abis_nm_tlv_parse(&tp, bts, foh->data, oh->length-sizeof(*foh));</span><br><span>@@ -995,7 +999,7 @@</span><br><span>             abis_nm_rx_set_bts_attr_ack(mb);</span><br><span>             break;</span><br><span>       case NM_MT_GET_ATTR_RESP:</span><br><span style="color: hsl(0, 100%, 40%);">-               ret = abis_nm_rx_get_attr_resp(mb, gsm_bts_trx_num(bts, (foh)->obj_inst.trx_nr));</span><br><span style="color: hsl(120, 100%, 40%);">+          ret = abis_nm_rx_get_attr_resp(mb);</span><br><span>          break;</span><br><span>       case NM_MT_ESTABLISH_TEI_ACK:</span><br><span>        case NM_MT_CONN_TERR_SIGN_ACK:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21501">change 21501</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-bsc/+/21501"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7181510c5021ff2712c09ebc6ec8b13fdd8e8dc2 </div>
<div style="display:none"> Gerrit-Change-Number: 21501 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>