Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.
Merged
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
24 changes: 6 additions & 18 deletions src/rdkv/impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void macIDToLower(char macValue[],char macConverted[])

char* get_deviceMAC()
{
if(strlen(deviceMAC) != 0)
if(strlen(deviceMAC) != 0 && strncmp(deviceMAC, "000000000000", 12) != 0)
{
WebcfgDebug("deviceMAC returned %s\n", deviceMAC);
return deviceMAC;
Expand All @@ -175,9 +175,10 @@ char* get_deviceMAC()
macIDToLower(deviceMACValue, deviceMAC);
WebcfgDebug("deviceMAC: %s\n",deviceMAC);
CPEABS_FREE(macID);
return deviceMAC;
}
WebcfgDebug("deviceMAC returned from lib is %s\n", deviceMAC);
return deviceMAC;
return NULL;
}

char* get_deviceWanMAC()
Expand Down Expand Up @@ -285,6 +286,8 @@ char * getParamValue(char *paramName)
CPEABS_FREE(parametervalArr[0]->name);
CPEABS_FREE(parametervalArr[0]->value);
CPEABS_FREE(parametervalArr[0]);
CPEABS_FREE(parametervalArr);
return paramValue;
}
else
{
Expand All @@ -293,7 +296,7 @@ char * getParamValue(char *paramName)
}
CPEABS_FREE(parametervalArr);
WebcfgDebug("getParamValue : paramValue is %s\n", paramValue);
return paramValue;
return NULL;
}

void writeToFile(char* pText)
Expand Down Expand Up @@ -443,14 +446,6 @@ int Get_Webconfig_URL( char *pString)
int Set_Webconfig_URL( char *pString)
{
snprintf(webCfgPersist.m_url, 1024, "%s", pString);
cJSON * pWebCfg = convertWebCfgDataToJson();
if (pWebCfg)
{
char* pString = cJSON_Print(pWebCfg);
writeToFile(pString);
cJSON_Delete(pWebCfg);
}

return RETURN_OK;
}

Expand All @@ -471,13 +466,6 @@ int Set_Supplementary_URL( char *name, char *pString)
{
(void) name;
snprintf(webCfgPersist.m_teleSuplUrl, 1024, "%s", pString);
cJSON * pWebCfg = convertWebCfgDataToJson();
if (pWebCfg)
{
char* pString = cJSON_Print(pWebCfg);
writeToFile(pString);
cJSON_Delete(pWebCfg);
}
return RETURN_OK;
}

Expand Down