From 4c7b58c66c6401a2ec8e30842919c71c670e70f4 Mon Sep 17 00:00:00 2001 From: sadhyama Date: Fri, 20 Dec 2024 19:00:07 +0530 Subject: [PATCH] Revert "RDKBDEV-2936: drop syscfg_init() as a public API" --- source/broadband/webpa_internal.c | 16 ++++++++-------- source/broadband/webpa_notification.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/source/broadband/webpa_internal.c b/source/broadband/webpa_internal.c index b6c1785c..dc7e6cc0 100644 --- a/source/broadband/webpa_internal.c +++ b/source/broadband/webpa_internal.c @@ -20,9 +20,6 @@ #endif #include -#ifdef RDKB_BUILD -#include -#endif /*----------------------------------------------------------------------------*/ /* File Scoped Variables */ /*----------------------------------------------------------------------------*/ @@ -1434,12 +1431,15 @@ WDMP_STATUS check_ethernet_wan_status() char *status = NULL; char isEthEnabled[64]={'\0'}; #ifdef RDKB_BUILD - if( 0 == syscfg_get( NULL, "eth_wan_enabled", isEthEnabled, sizeof(isEthEnabled)) && (isEthEnabled[0] != '\0' && strncmp(isEthEnabled, "true", strlen("true")) == 0)) + if(0 == syscfg_init()) { - WalInfo("Ethernet WAN is enabled\n"); - OnboardLog("Ethernet WAN is enabled\n"); - eth_wan_status = TRUE; - return WDMP_SUCCESS; + if( 0 == syscfg_get( NULL, "eth_wan_enabled", isEthEnabled, sizeof(isEthEnabled)) && (isEthEnabled[0] != '\0' && strncmp(isEthEnabled, "true", strlen("true")) == 0)) + { + WalInfo("Ethernet WAN is enabled\n"); + OnboardLog("Ethernet WAN is enabled\n"); + eth_wan_status = TRUE; + return WDMP_SUCCESS; + } } else #endif diff --git a/source/broadband/webpa_notification.c b/source/broadband/webpa_notification.c index df8a5987..f437179f 100644 --- a/source/broadband/webpa_notification.c +++ b/source/broadband/webpa_notification.c @@ -587,9 +587,14 @@ static void getNotifyParamList(const char ***paramList, int *size) } char meshEnable[64]; memset(meshEnable, 0, sizeof(meshEnable)); - if(syscfg_get( NULL, "mesh_enable", meshEnable, sizeof(meshEnable))!=0) - WalError("syscfg_get failed\n"); - + if(0 == syscfg_init()) + { + syscfg_get( NULL, "mesh_enable", meshEnable, sizeof(meshEnable)); + } + else + { + WalError("syscfg_init failed\n"); + } if(meshEnable[0] != '\0' && strncmp(meshEnable, "true", strlen("true")) == 0) { WalInfo("Mesh/plume is enabled\n");