From 5eddf98dfc194bc72f0a0694f6c3a02f601c5bf1 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 12 Feb 2019 20:55:22 +0100 Subject: OML: Store merged attributes of IPA OML Managed Objects For the TS 12.21 standard OML attributes, we store a copy of the most-recently set value for each attribute in "mo->nm_attr". This somehow was missed when adding support for the IPA specific MOs like those relevant for GPRS. Change-Id: I75ebda46da9c1fcecc484311bf3833f31c536ee1 --- src/common/oml.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/common/oml.c b/src/common/oml.c index e544b571..b04caf63 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1308,8 +1308,8 @@ static int oml_ipa_mo_set_attr(struct gsm_bts *bts, const struct gsm_abis_mo *mo static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg) { struct abis_om_fom_hdr *foh = msgb_l3(msg); - const struct gsm_abis_mo *mo; - struct tlv_parsed tp; + struct gsm_abis_mo *mo; + struct tlv_parsed tp, *tp_merged; void *obj; int rc; @@ -1334,6 +1334,14 @@ static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg) return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); rc = oml_ipa_mo_set_attr(bts, mo, obj, &tp); + if (rc == 0) { + /* Success: replace old MO attributes with new */ + /* merge existing MO attributes with new attributes */ + tp_merged = osmo_tlvp_copy(mo->nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); + talloc_free(mo->nm_attr); + mo->nm_attr = tp_merged; + } return oml_fom_ack_nack(msg, rc); } -- cgit v1.2.3