This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/21501 ) Change subject: abis_nm: Simplify param passing to abis_nm_rx_get_attr_resp() ...................................................................... abis_nm: Simplify param passing to abis_nm_rx_get_attr_resp() There's no real need to retrieve the trx before passing it to the function, we can do that in the function itself and hence also simplify the function itself. Related: OS#4870 Change-Id: I7181510c5021ff2712c09ebc6ec8b13fdd8e8dc2 --- M src/osmo-bsc/abis_nm.c 1 file changed, 7 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index b64b4dc..9db49b7 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -669,15 +669,19 @@ } /* Handle 3GPP TS 52.021 §8.11.3 Get Attribute Response */ -static int abis_nm_rx_get_attr_resp(struct msgb *mb, const struct gsm_bts_trx *trx) +static int abis_nm_rx_get_attr_resp(struct msgb *mb) { struct abis_om_hdr *oh = msgb_l2(mb); struct abis_om_fom_hdr *foh = msgb_l3(mb); struct e1inp_sign_link *sign_link = mb->dst; - struct gsm_bts *bts = trx ? trx->bts : sign_link->trx->bts; + struct gsm_bts *bts = sign_link->trx->bts; + const struct gsm_bts_trx *trx; struct tlv_parsed tp; int rc; + trx = foh->obj_class == NM_OC_BASEB_TRANSC ? + gsm_bts_trx_num(bts, foh->obj_inst.trx_nr) : NULL; + DEBUGPFOH(DNM, foh, "Get Attributes Response\n"); abis_nm_tlv_parse(&tp, bts, foh->data, oh->length-sizeof(*foh)); @@ -995,7 +999,7 @@ abis_nm_rx_set_bts_attr_ack(mb); break; case NM_MT_GET_ATTR_RESP: - ret = abis_nm_rx_get_attr_resp(mb, gsm_bts_trx_num(bts, (foh)->obj_inst.trx_nr)); + ret = abis_nm_rx_get_attr_resp(mb); break; case NM_MT_ESTABLISH_TEI_ACK: case NM_MT_CONN_TERR_SIGN_ACK: -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/21501 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I7181510c5021ff2712c09ebc6ec8b13fdd8e8dc2 Gerrit-Change-Number: 21501 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201204/7be0556e/attachment.htm>