Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "RDKBDEV-2936: drop syscfg_init() as a public API" #289

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading