aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/oml.c
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2017-02-09 19:03:11 +0300
committerIvan Kluchnikov <kluchnikovi@gmail.com>2017-02-20 13:28:38 +0000
commit64d16028eb7d38bb442591c6c0224ae28eb3e2be (patch)
treec2813caab7068cc4ea9b33889778bd9d82db5dc3 /src/common/oml.c
parent70c68853c289bf13822a7c76cd2434fcf7364576 (diff)
oml: Fix incorrect usage of const variable abis_nm_att_tlvdef_ipa
This bug was introduced during moving oml definitions from osmo-bts to libosmocore in libosmocore 0bee65c0d89f81a4b90aa3d484016d9ba680dd46 and osmo-bts 2cf6b73a4278627331bdbbb4addf1a8bc1d964ce: The type of abis_nm_att_tlvdef_ipa was changed from struct tlv_definition to const struct tlv_definition, so: * create static abis_nm_att_tlvdef_ipa_local variable for oml attribute definitions * copy abis_nm_att_tlvdef_ipa to abis_nm_att_tlvdef_ipa_local * merge abis_nm_att_tlvdef with abis_nm_att_tlvdef_ipa_local * use abis_nm_att_tlvdef_ipa_local in oml_tlv_parse function Change-Id: Ia9f3c94ab247adeecb26a01c3ccd6f3a8c17ba1c
Diffstat (limited to 'src/common/oml.c')
-rw-r--r--src/common/oml.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 272123e6..7069377f 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -46,13 +46,15 @@
static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg);
+static struct tlv_definition abis_nm_att_tlvdef_ipa_local = {};
+
/*
* support
*/
static int oml_tlv_parse(struct tlv_parsed *tp, const uint8_t *buf, int len)
{
- return tlv_parse(tp, &abis_nm_att_tlvdef_ipa, buf, len, 0, 0);
+ return tlv_parse(tp, &abis_nm_att_tlvdef_ipa_local, buf, len, 0, 0);
}
struct msgb *oml_msgb_alloc(void)
@@ -1247,7 +1249,8 @@ static int handle_fail_sig(unsigned int subsys, unsigned int signal, void *handl
int oml_init(struct gsm_abis_mo *mo)
{
DEBUGP(DOML, "Initializing OML attribute definitions\n");
- tlv_def_patch(&abis_nm_att_tlvdef_ipa, &abis_nm_att_tlvdef);
+ tlv_def_patch(&abis_nm_att_tlvdef_ipa_local, &abis_nm_att_tlvdef_ipa);
+ tlv_def_patch(&abis_nm_att_tlvdef_ipa_local, &abis_nm_att_tlvdef);
osmo_signal_register_handler(SS_FAIL, handle_fail_sig, mo);
return 0;