diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-02-12 20:55:22 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-02-23 15:59:10 +0100 |
commit | 5eddf98dfc194bc72f0a0694f6c3a02f601c5bf1 (patch) | |
tree | b347bd0ee81bdeada285a74ea6f18d91ce322e39 /src/common | |
parent | b3fb33adea51d6caa812741ff323d1672244ebf0 (diff) |
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
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/oml.c | 12 |
1 files 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); } |