RDKCOM-5593: RDKBDEV-3446 IPQ Bug Fixes for QCOM#337
Open
VedhaLoganathan wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adjusts platform-specific behavior for command logging and partner/default network configuration application, adding special handling for _COSA_QCA_ARM_.
Changes:
- Suppress
vsystem()command logging on_COSA_QCA_ARM_. - Treat
_COSA_QCA_ARM_like_RDK_REF_PLATFORM_for PartnerID selection. - Add
syscfg_get()-based gating before applying certain network-related partner defaults.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| source/util/utils/util.c | Conditionally disables stderr command logging for _COSA_QCA_ARM_. |
| source/scripts/init/src/apply_system_defaults/apply_system_defaults.c | Adds _COSA_QCA_ARM_ PartnerID handling and gates partner default application based on current syscfg values. |
Comments suppressed due to low confidence (3)
source/scripts/init/src/apply_system_defaults/apply_system_defaults.c:2544
- The new gating condition only calls
set_syscfg_partner_values()when the current syscfg value already matches the partner/default value (strcmp(...) == 0). That makes these updates effectively a no-op in the typical case where the intent is to apply partner defaults. If the goal is to apply partner values when they differ, the comparison should be inverted (apply whenstrcmp(...) != 0). If the goal is instead “only apply when the device is still at factory defaults”, this should compare against the known factory default (or “unset”/missing key state) rather than comparing current value to the partner value being applied.
defaultAdminIP = paramObjVal->valuestring;
syscfg_get( NULL, "lan_ipaddr", buf, sizeof( buf ));
if ((defaultAdminIP != NULL) && (strcmp(buf, defaultAdminIP) == 0))
{
set_syscfg_partner_values(defaultAdminIP,"lan_ipaddr");
defaultAdminIP = NULL;
}
source/scripts/init/src/apply_system_defaults/apply_system_defaults.c:2561
- The new gating condition only calls
set_syscfg_partner_values()when the current syscfg value already matches the partner/default value (strcmp(...) == 0). That makes these updates effectively a no-op in the typical case where the intent is to apply partner defaults. If the goal is to apply partner values when they differ, the comparison should be inverted (apply whenstrcmp(...) != 0). If the goal is instead “only apply when the device is still at factory defaults”, this should compare against the known factory default (or “unset”/missing key state) rather than comparing current value to the partner value being applied.
subnetRange = paramObjVal->valuestring;
syscfg_get( NULL, "lan_netmask", buf, sizeof( buf ));
if ((subnetRange != NULL) && (strcmp(buf, subnetRange) == 0))
{
set_syscfg_partner_values(subnetRange,"lan_netmask");
subnetRange = NULL;
}
source/scripts/init/src/apply_system_defaults/apply_system_defaults.c:2577
- The new gating condition only calls
set_syscfg_partner_values()when the current syscfg value already matches the partner/default value (strcmp(...) == 0). That makes these updates effectively a no-op in the typical case where the intent is to apply partner defaults. If the goal is to apply partner values when they differ, the comparison should be inverted (apply whenstrcmp(...) != 0). If the goal is instead “only apply when the device is still at factory defaults”, this should compare against the known factory default (or “unset”/missing key state) rather than comparing current value to the partner value being applied.
minAddress = paramObjVal->valuestring;
syscfg_get( NULL, "dhcp_start", buf, sizeof( buf ));
if ((minAddress != NULL) && (strcmp(buf, minAddress) ==0))
{
set_syscfg_partner_values(minAddress,"dhcp_start");
minAddress = NULL;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
2586
to
2591
| maxAddress = paramObjVal->valuestring; | ||
| syscfg_get( NULL, "dhcp_end", buf, sizeof( buf )); | ||
|
|
||
| if (maxAddress != NULL) | ||
| if ((maxAddress != NULL) && (strcmp(buf, maxAddress) == 0)) | ||
| { | ||
| set_syscfg_partner_values(maxAddress,"dhcp_end"); |
| cJSON *alwaysParamObjVal = NULL; | ||
| char *error_ptr = NULL; | ||
| int iterator = 0; | ||
| char buf[50] = {0}; |
Comment on lines
+69
to
+71
| #ifndef _COSA_QCA_ARM_ | ||
| fprintf(stderr, "%s: %s\n", __FUNCTION__, cmd); | ||
| #endif |
Signed-off-by: VedhaLoganathan <vedhaval@qti.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RDKBDEV-3446: IPQ Bug Fixes for QCOM Platform
Reason for change:
Test Procedure: Flash the image with fix and test the captive portal functionality in IPQ
Risks: Low