Skip to content

Conversation

@Vismalskumar0
Copy link
Contributor

RDKEMW-13649-[support/8.4.4.0] Define tr181 parameter and handlers for the IUI Version 2

@Vismalskumar0 Vismalskumar0 requested a review from a team as a code owner February 9, 2026 09:58
Copilot AI review requested due to automatic review settings February 9, 2026 09:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for a new TR-181 DeviceInfo parameter to expose/set the IUI Version 2 “AppsVersion”, and adjusts logging verbosity in hostIf message handlers.

Changes:

  • Define new TR-181 parameter string Device.DeviceInfo.X_RDKCENTRAL-COM.IUI.AppsVersion.
  • Implement get/set handlers for IUI AppsVersion backed by /tmp/.iuiAppsVersion.
  • Route GET/SET requests for the new parameter through DeviceClientReqHandler.
  • Reduce per-request timing log verbosity from INFO to DEBUG in hostIf msg handlers.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/hostif/profiles/DeviceInfo/Device_DeviceInfo.h Adds the new parameter macro and declares new AppsVersion get/set APIs.
src/hostif/profiles/DeviceInfo/Device_DeviceInfo.cpp Implements file-backed get/set logic for IUI AppsVersion.
src/hostif/handlers/src/hostIf_DeviceClient_ReqHandler.cpp Wires the new TR-181 parameter into the GET/SET dispatch chain.
src/hostif/handlers/src/hostIf_msgHandler.cpp Lowers log level for per-request timing logs (INFO → DEBUG).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +2431 to +2437
// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code calls std::remove(IUI_APPSVERSION_FILE) but Device_DeviceInfo.cpp does not include . With already included, this can fail to compile due to std::remove resolving to the algorithm overload set (or std::remove not being declared). Include (or use ::remove/unlink with the proper header) to ensure the file removal call is well-defined.

Copilot uses AI. Check for mistakes.
Comment on lines 1123 to +1127
int set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadUseCodebig(HOSTIF_MsgData_t *);
int set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadDeferReboot(HOSTIF_MsgData_t *);
int set_Device_DeviceInfo_IUI_Version(HOSTIF_MsgData_t *);
int set_Device_DeviceInfo_IUI_AppsVersion(HOSTIF_MsgData_t *);
int get_Device_DeviceInfo_IUI_AppsVersion(HOSTIF_MsgData_t *, bool *pChanged = NULL);
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new get_Device_DeviceInfo_IUI_AppsVersion() declaration is placed in the “Helper methods” setter section, which makes the header harder to navigate (the other DeviceInfo getters are grouped earlier, e.g. get_Device_DeviceInfo_IUI_Version). Move this getter prototype into the main getter section near the existing IUI Version getter (and keep the setter in the setter section) to match the file’s organization.

Copilot uses AI. Check for mistakes.
Comment on lines +2380 to +2458
int hostIf_DeviceInfo::get_Device_DeviceInfo_IUI_AppsVersion(HOSTIF_MsgData_t * stMsgData, bool *pChanged)
{
int ret=NOT_HANDLED;
stMsgData->paramtype = hostIf_StringType;

std::string iuiAppsVersion;
std::ifstream file(IUI_APPSVERSION_FILE);

if (!file.is_open()) {
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "[%s:%s:%d] IUI AppsVersion file does not exist, returning empty value\n", __FUNCTION__, __FILE__, __LINE__);
stMsgData->paramValue[0] = '\0';
stMsgData->paramLen = 0;
return OK;
}

if (std::getline(file, iuiAppsVersion)) {
// Remove newline char if any in iui apps version
if (!iuiAppsVersion.empty() && iuiAppsVersion.back() == '\n') {
iuiAppsVersion.pop_back();
}

RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "[%s:%s:%d] iuiAppsVersion = %s.\n", __FUNCTION__, __FILE__, __LINE__, iuiAppsVersion.c_str());
strncpy((char *)stMsgData->paramValue, iuiAppsVersion.c_str(), sizeof(stMsgData->paramValue)-1);
stMsgData->paramValue[sizeof(stMsgData->paramValue)-1] = '\0';
stMsgData->paramLen = iuiAppsVersion.length();

RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "[%s:%s:%d] paramValue: %s stMsgData->paramLen: %d \n", __FUNCTION__, __FILE__, __LINE__, stMsgData->paramValue, stMsgData->paramLen);
ret = OK;
} else {
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "%s(): No data in IUI AppsVersion file, returning empty value.\n", __FUNCTION__);
stMsgData->paramValue[0] = '\0';
stMsgData->paramLen = 0;
ret = OK;
}

file.close();

RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s()]\n", __FUNCTION__);
return ret;

}

int hostIf_DeviceInfo::set_Device_DeviceInfo_IUI_AppsVersion(HOSTIF_MsgData_t *stMsgData)
{
std::string iuiAppsVersion = getStringValue(stMsgData);

if (iuiAppsVersion.empty()) {
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);

// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}


std::ofstream file(IUI_APPSVERSION_FILE);
if (!file.is_open()) {
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s:%s:%d] Failed to open IUI AppsVersion file for writing\n", __FUNCTION__, __FILE__, __LINE__);
return NOK;
}

file << iuiAppsVersion;

if (file.fail()) {
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s:%s:%d] Failed to write IUI AppsVersion to file\n", __FUNCTION__, __FILE__, __LINE__);
file.close();
return NOK;
}

RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "[%s:%s:%d] Successfully wrote IUI AppsVersion: %s\n", __FUNCTION__, __FILE__, __LINE__, iuiAppsVersion.c_str());
file.close();
return OK;
}
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are existing gtests covering the IUI Version get/set behaviors (including file-missing and empty-file cases), but there are no equivalent tests added for the new IUI AppsVersion get/set. Add unit tests for reading/writing /tmp/.iuiAppsVersion (normal value, file missing/cleared, and empty file) to prevent regressions.

Copilot uses AI. Check for mistakes.
Comment on lines +2426 to +2444
if (iuiAppsVersion.empty()) {
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);

// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}


std::ofstream file(IUI_APPSVERSION_FILE);
if (!file.is_open()) {
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s:%s:%d] Failed to open IUI AppsVersion file for writing\n", __FUNCTION__, __FILE__, __LINE__);
return NOK;
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In set_Device_DeviceInfo_IUI_AppsVersion(), the empty-value path removes the AppsVersion file but then continues to open the file and write (recreating an empty file). This makes “clear” ineffective and can leave an empty file behind. After handling the empty value, return OK (or skip the write) so the file is actually removed/cleared as intended.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 11, 2026 10:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 12 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +4415 to +4421
<parameter base="AppsVersion" access="readWrite" notification="0" maxNotification="2">
<syntax>
<string/>
<default type="factory" value=""/>
</syntax>
</parameter>
</object>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent closing tag formatting: The closing tag uses a tab character for indentation while the surrounding closing tags (like at line 4414 for the Version parameter) use spaces. This should be made consistent with the rest of the file's indentation style.

Suggested change
<parameter base="AppsVersion" access="readWrite" notification="0" maxNotification="2">
<syntax>
<string/>
<default type="factory" value=""/>
</syntax>
</parameter>
</object>
<parameter base="AppsVersion" access="readWrite" notification="0" maxNotification="2">
<syntax>
<string/>
<default type="factory" value=""/>
</syntax>
</parameter>
</object>

Copilot uses AI. Check for mistakes.
{
ret = pIface->get_Device_DeviceInfo_IUI_Version(stMsgData);
}
else if (strcasecmp(stMsgData->paramName,IUI_APPSVERSION) == 0)
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: This line uses tabs instead of spaces like the surrounding code. The rest of the file uses 8 spaces for the first level of indentation in else-if blocks. Please change the leading tab to 8 spaces to match the existing code style.

Suggested change
else if (strcasecmp(stMsgData->paramName,IUI_APPSVERSION) == 0)
else if (strcasecmp(stMsgData->paramName,IUI_APPSVERSION) == 0)

Copilot uses AI. Check for mistakes.
Comment on lines +2422 to +2458
int hostIf_DeviceInfo::set_Device_DeviceInfo_IUI_AppsVersion(HOSTIF_MsgData_t *stMsgData)
{
std::string iuiAppsVersion = getStringValue(stMsgData);

if (iuiAppsVersion.empty()) {
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);

// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}


std::ofstream file(IUI_APPSVERSION_FILE);
if (!file.is_open()) {
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s:%s:%d] Failed to open IUI AppsVersion file for writing\n", __FUNCTION__, __FILE__, __LINE__);
return NOK;
}

file << iuiAppsVersion;

if (file.fail()) {
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s:%s:%d] Failed to write IUI AppsVersion to file\n", __FUNCTION__, __FILE__, __LINE__);
file.close();
return NOK;
}

RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "[%s:%s:%d] Successfully wrote IUI AppsVersion: %s\n", __FUNCTION__, __FILE__, __LINE__, iuiAppsVersion.c_str());
file.close();
return OK;
}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent error handling behavior compared to the existing IUI_Version setter. The set_Device_DeviceInfo_IUI_Version function (lines 2326-2352) returns NOK when an empty value is provided, treating it as an error condition. However, this new function treats an empty value as a valid operation to clear the stored value by removing the file. This inconsistency in behavior between similar parameters could be confusing. Consider whether this different behavior is intentional and properly documented, or if the implementations should be aligned.

Copilot uses AI. Check for mistakes.

// Calculate time taken in microseconds
RDK_LOG(RDK_LOG_INFO, LOG_TR69HOSTIF,
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logging change appears unrelated to the IUI AppsVersion feature described in the PR title and description. While the change from RDK_LOG_INFO to RDK_LOG_DEBUG is appropriate for per-operation logging to reduce log verbosity, it should ideally be in a separate PR or at least mentioned in the PR description. This makes it harder to track changes and understand the scope of the PR.

Copilot uses AI. Check for mistakes.
paramValueToString(stMsgData, paramValueStr, sizeof(paramValueStr));

RDK_LOG(RDK_LOG_INFO, LOG_TR69HOSTIF,
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logging change appears unrelated to the IUI AppsVersion feature described in the PR title and description. While the change from RDK_LOG_INFO to RDK_LOG_DEBUG is appropriate for per-operation logging to reduce log verbosity, it should ideally be in a separate PR or at least mentioned in the PR description. This makes it harder to track changes and understand the scope of the PR.

Copilot uses AI. Check for mistakes.
Comment on lines +4415 to +4421
<parameter base="AppsVersion" access="readWrite" notification="0" maxNotification="2">
<syntax>
<string/>
<default type="factory" value=""/>
</syntax>
</parameter>
</object>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: This parameter definition uses tabs instead of tabs for indentation, which is inconsistent with the "Version" parameter above it (lines 4409-4414). Please use tabs consistently throughout the IUI object definition to match the existing style.

Suggested change
<parameter base="AppsVersion" access="readWrite" notification="0" maxNotification="2">
<syntax>
<string/>
<default type="factory" value=""/>
</syntax>
</parameter>
</object>
<parameter base="AppsVersion" access="readWrite" notification="0" maxNotification="2">
<syntax>
<string/>
<default type="factory" value=""/>
</syntax>
</parameter>
</object>

Copilot uses AI. Check for mistakes.
Comment on lines +2380 to +2418
int hostIf_DeviceInfo::get_Device_DeviceInfo_IUI_AppsVersion(HOSTIF_MsgData_t * stMsgData, bool *pChanged)
{
int ret=NOT_HANDLED;
stMsgData->paramtype = hostIf_StringType;

std::string iuiAppsVersion;
std::ifstream file(IUI_APPSVERSION_FILE);

if (!file.is_open()) {
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "[%s:%s:%d] IUI AppsVersion file does not exist, returning empty value\n", __FUNCTION__, __FILE__, __LINE__);
stMsgData->paramValue[0] = '\0';
stMsgData->paramLen = 0;
return OK;
}

if (std::getline(file, iuiAppsVersion)) {
// Remove newline char if any in iui apps version
if (!iuiAppsVersion.empty() && iuiAppsVersion.back() == '\n') {
iuiAppsVersion.pop_back();
}

RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "[%s:%s:%d] iuiAppsVersion = %s.\n", __FUNCTION__, __FILE__, __LINE__, iuiAppsVersion.c_str());
strncpy((char *)stMsgData->paramValue, iuiAppsVersion.c_str(), sizeof(stMsgData->paramValue)-1);
stMsgData->paramValue[sizeof(stMsgData->paramValue)-1] = '\0';
stMsgData->paramLen = iuiAppsVersion.length();

RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "[%s:%s:%d] paramValue: %s stMsgData->paramLen: %d \n", __FUNCTION__, __FILE__, __LINE__, stMsgData->paramValue, stMsgData->paramLen);
ret = OK;
} else {
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, "%s(): No data in IUI AppsVersion file, returning empty value.\n", __FUNCTION__);
stMsgData->paramValue[0] = '\0';
stMsgData->paramLen = 0;
ret = OK;
}

file.close();

RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s()]\n", __FUNCTION__);
return ret;
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent error handling behavior compared to the existing IUI_Version getter. The get_Device_DeviceInfo_IUI_Version function (lines 2289-2324) returns NOK and logs an error when the file doesn't exist or when std::getline fails. However, this new function returns OK with an empty value in both cases. This inconsistency could cause unexpected behavior. Consider whether returning OK with an empty value is the intended behavior for both missing files and empty files, or if it should match the error handling of IUI_Version.

Copilot uses AI. Check for mistakes.
Comment on lines +2427 to +2440
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);

// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}


Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic error: After attempting to remove the file when an empty value is provided, the code continues to try to open and write to the same file. If the file removal succeeds, the code will create a new empty file, which contradicts the intention of clearing the stored value. The function should return OK after the empty value handling block (after line 2438) instead of continuing to the file writing logic.

Suggested change
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);
// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);
// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
return OK;
}

Copilot uses AI. Check for mistakes.
Comment on lines +2427 to +2438
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);

// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: The closing brace for the if statement is not properly indented. It should align with the "if" statement at the same level as line 2426. This appears to be using spaces where the rest of the function uses standard indentation.

Suggested change
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);
// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);
// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}

Copilot uses AI. Check for mistakes.
Comment on lines +2427 to +2438
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);

// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: The opening of the if statement block at line 2426 appears to be missing proper indentation. The RDK_LOG call and comment inside the block should be indented further to indicate they are within the if statement body. The current formatting makes the code structure unclear.

Suggested change
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);
// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,
"[%s:%s:%d] Empty IUI AppsVersion provided, will clear the stored value\n",
__FUNCTION__, __FILE__, __LINE__);
// Remove the file if empty value is set
if (std::remove(IUI_APPSVERSION_FILE) != 0) {
RDK_LOG(RDK_LOG_WARN, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to remove %s\n",
__FUNCTION__, __FILE__, __LINE__,
IUI_APPSVERSION_FILE);
}
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants