-
Notifications
You must be signed in to change notification settings - Fork 3
RDKEMW-13649-[support/8.4.4.0] Define tr181 parameter and handlers for the IUI Version 2 #353
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
base: support/1.2.8
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
| // 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
AI
Feb 9, 2026
There was a problem hiding this comment.
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.
| 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); |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
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.
| 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; | ||
| } |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
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.
| 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; |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
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.
Added a new parameter 'AppsVersion' to the data model.
There was a problem hiding this 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.
| <parameter base="AppsVersion" access="readWrite" notification="0" maxNotification="2"> | ||
| <syntax> | ||
| <string/> | ||
| <default type="factory" value=""/> | ||
| </syntax> | ||
| </parameter> | ||
| </object> |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| <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> |
| { | ||
| ret = pIface->get_Device_DeviceInfo_IUI_Version(stMsgData); | ||
| } | ||
| else if (strcasecmp(stMsgData->paramName,IUI_APPSVERSION) == 0) |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| else if (strcasecmp(stMsgData->paramName,IUI_APPSVERSION) == 0) | |
| else if (strcasecmp(stMsgData->paramName,IUI_APPSVERSION) == 0) |
| 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; | ||
| } |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
|
|
||
| // Calculate time taken in microseconds | ||
| RDK_LOG(RDK_LOG_INFO, LOG_TR69HOSTIF, | ||
| RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| paramValueToString(stMsgData, paramValueStr, sizeof(paramValueStr)); | ||
|
|
||
| RDK_LOG(RDK_LOG_INFO, LOG_TR69HOSTIF, | ||
| RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF, |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| <parameter base="AppsVersion" access="readWrite" notification="0" maxNotification="2"> | ||
| <syntax> | ||
| <string/> | ||
| <default type="factory" value=""/> | ||
| </syntax> | ||
| </parameter> | ||
| </object> |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| <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> |
| 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; |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| 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
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| 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; | |
| } |
| 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
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| 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); | |
| } | |
| } |
| 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
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| 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); | |
| } | |
| } |
RDKEMW-13649-[support/8.4.4.0] Define tr181 parameter and handlers for the IUI Version 2