Skip to content

Commit

Permalink
Merge pull request #289 from xmidt-org/revert-280-RDKBDEV-2936
Browse files Browse the repository at this point in the history
Revert "RDKBDEV-2936: drop syscfg_init() as a public API"
  • Loading branch information
sadhyama authored Dec 20, 2024
2 parents f371eca + 4c7b58c commit ba76ce8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
16 changes: 8 additions & 8 deletions source/broadband/webpa_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#endif

#include <cJSON.h>
#ifdef RDKB_BUILD
#include <syscfg/syscfg.h>
#endif
/*----------------------------------------------------------------------------*/
/* File Scoped Variables */
/*----------------------------------------------------------------------------*/
Expand Down Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions source/broadband/webpa_notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ba76ce8

Please sign in to comment.