From 96379bc9f55045293f67486f9c23028d16d27315 Mon Sep 17 00:00:00 2001 From: Amin Ben Ramdhane Date: Wed, 11 May 2022 23:32:25 +0100 Subject: [PATCH] T#7824: VoiceService PrefixInfo data model missing entries --- .../tr104/servicesvoiceservicecallcontrol.c | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/dmtree/tr104/servicesvoiceservicecallcontrol.c b/dmtree/tr104/servicesvoiceservicecallcontrol.c index 7e41b7d8..0eb42ada 100644 --- a/dmtree/tr104/servicesvoiceservicecallcontrol.c +++ b/dmtree/tr104/servicesvoiceservicecallcontrol.c @@ -245,20 +245,16 @@ static int browseServicesVoiceServiceCallControlNumberingPlanPrefixInfo(struct d synchronize_specific_config_sections_with_dmmap("asterisk", "prefixinfo", "dmmap_asterisk", &dup_list); list_for_each_entry(p, &dup_list, list) { - char *type = NULL; - dmuci_get_value_by_section_string(p->config_section, "facilityaction", &type); - if( *type ){ - if (!dm_validate_string(type, -1, -1, FacilityAction, NULL)) - inst = handle_instance(dmctx, parent_node, p->dmmap_section, "prefixinfoinstance", "prefixinfoalias"); - } - else - inst = handle_instance(dmctx, parent_node, p->dmmap_section, "prefixinfoinstance", "prefixinfoalias"); + char *type = NULL; - if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p, inst) == DM_STOP) - break; + dmuci_get_value_by_section_string(p->config_section, "facilityaction", &type); + if (dm_validate_string(type, -1, -1, FacilityAction, NULL)) + continue; - if (type && *type) - dmfree(type); + inst = handle_instance(dmctx, parent_node, p->dmmap_section, "prefixinfoinstance", "prefixinfoalias"); + + if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p, inst) == DM_STOP) + break; } free_dmmap_config_dup_list(&dup_list); return 0;