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

RDKBDEV-2936: drop syscfg_init() as a public API #280

Merged
merged 4 commits into from
Nov 4, 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,6 +20,9 @@
#endif

#include <cJSON.h>
#ifdef RDKB_BUILD
#include <syscfg/syscfg.h>
pradeeptakdas marked this conversation as resolved.
Show resolved Hide resolved
#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
Loading