From 1392c92db10cc3cd2cd8b0932b78ab5182239225 Mon Sep 17 00:00:00 2001 From: Amin Ben Ramdhane Date: Wed, 22 Jun 2022 10:54:17 +0100 Subject: [PATCH] Define a section name for the new sections 'mapcontroller->ap' added by 'SetSSID()' operate --- dmtree/tr181/wifi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dmtree/tr181/wifi.c b/dmtree/tr181/wifi.c index 8ee85b87..d348ee38 100644 --- a/dmtree/tr181/wifi.c +++ b/dmtree/tr181/wifi.c @@ -6050,7 +6050,12 @@ static int operate_WiFiDataElementsNetwork_SetSSID(char *refparam, struct dmctx } if (!ssid_exist) { + char sec_name[32]; + + snprintf(sec_name, sizeof(sec_name), "ap_%s_%s", ssid, (*band == '5') ? "5" : "2"); + dmuci_add_section("mapcontroller", "ap", &s); + dmuci_rename_section_by_section(s, sec_name); dmuci_set_value_by_section(s, "ssid", ssid); dmuci_set_value_by_section(s, "key", key); dmuci_set_value_by_section(s, "type", "fronthaul");