Skip to content

Commit

Permalink
Merge pull request #280 from pradeeptakdas/RDKBDEV-2936
Browse files Browse the repository at this point in the history
RDKBDEV-2936: drop syscfg_init() as a public API
  • Loading branch information
sadhyama authored Nov 4, 2024
2 parents 039fa62 + 608f753 commit 6d195f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 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,6 +20,9 @@
#endif

#include <cJSON.h>
#ifdef RDKB_BUILD
#include <syscfg/syscfg.h>
#endif
/*----------------------------------------------------------------------------*/
/* File Scoped Variables */
/*----------------------------------------------------------------------------*/
Expand Down Expand Up @@ -1431,15 +1434,12 @@ WDMP_STATUS check_ethernet_wan_status()
char *status = NULL;
char isEthEnabled[64]={'\0'};
#ifdef RDKB_BUILD
if(0 == syscfg_init())
if( 0 == syscfg_get( NULL, "eth_wan_enabled", isEthEnabled, sizeof(isEthEnabled)) && (isEthEnabled[0] != '\0' && strncmp(isEthEnabled, "true", strlen("true")) == 0))
{
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;
}
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: 3 additions & 8 deletions source/broadband/webpa_notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,14 +714,9 @@ static void getNotifyParamList(const char ***paramList, int *size)
}
char meshEnable[64];
memset(meshEnable, 0, sizeof(meshEnable));
if(0 == syscfg_init())
{
syscfg_get( NULL, "mesh_enable", meshEnable, sizeof(meshEnable));
}
else
{
WalError("syscfg_init failed\n");
}
if(syscfg_get( NULL, "mesh_enable", meshEnable, sizeof(meshEnable))!=0)
WalError("syscfg_get failed\n");

if(meshEnable[0] != '\0' && strncmp(meshEnable, "true", strlen("true")) == 0)
{
WalInfo("Mesh/plume is enabled\n");
Expand Down

0 comments on commit 6d195f3

Please sign in to comment.