Skip to content
Open
Changes from 10 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0a3293d
RDKB-777777: Get the udhcpc arguments for virtual mta interface
Amaresh-Kotekal Nov 27, 2025
18a8f27
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Dec 12, 2025
9ec72c7
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Dec 16, 2025
af6fb95
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Dec 17, 2025
99fbc60
RDKB-777777: Get the udhcpc arguments for virtual mta interface
Amaresh-Kotekal Dec 18, 2025
0ad0623
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Dec 19, 2025
65c01cf
RDKB-777777: Get the udhcpc arguments for virtual mta interface
Amaresh-Kotekal Dec 19, 2025
3caa07e
RDKB-777777: Get the udhcpc arguments for macvlan mta interface
Amaresh-Kotekal Dec 24, 2025
6440c35
RDKB-62812:Create Virtual Interface for voice and initialize DHCP
Amaresh-Kotekal Dec 25, 2025
241dcde
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Jan 20, 2026
e3fcff2
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Jan 22, 2026
62c3669
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Jan 23, 2026
5893aed
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Jan 23, 2026
72b32fb
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Jan 28, 2026
0de112f
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Jan 31, 2026
c3f88ae
RDKB-62813:DHCP Data Handling and Initialization of voice
Amaresh-Kotekal Jan 31, 2026
b4546c7
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Feb 4, 2026
52f8ccb
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Feb 7, 2026
bda2d1f
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Feb 9, 2026
165c493
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Feb 11, 2026
8a068ed
RDKB-62813:DHCP Data Handling and Initialization of voice
Amaresh-Kotekal Feb 12, 2026
9c80873
Merge branch 'rdkcentral:develop' into develop
Amaresh-Kotekal Feb 13, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,18 @@ STATIC void addInSysCfgdDB (char *key, char *value)
set_syscfg_partner_values( value,"IPv6PrimaryDhcpServerOptions" );
}
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Enabled"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Enabled"))
set_syscfg_partner_values(value, "VoiceSupport_Enabled");

if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_IfaceName"))
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
Comment on lines +1462 to +1468
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

These VoiceSupport syscfg mappings were added only in apply_system_defaults.c, but this file is not built when PARTNER_DEFAULT_EXT is enabled (see source/scripts/init/src/apply_system_defaults/Makefile.am:49-53). If affected targets use PARTNER_DEFAULT_EXT, the default VoiceSupport_* values will never be initialized. Please add the same mappings to apply_system_defaults_helper.c / apply_system_defaults_syscfg path (or move the logic into the shared helper) so behavior is consistent across build variants.

Copilot uses AI. Check for mistakes.

if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Mode"))
set_syscfg_partner_values(value, "VoiceSupport_Mode");
Comment on lines +1463 to +1472
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

These nested if statements are the only ones in this MTA block that omit braces, whereas all the neighboring cases (e.g., the StartupIPMode/DhcpServerOptions blocks above) use full {} blocks for both the outer key check and the inner IsValuePresentinSyscfgDB check. For consistency and to avoid future errors when editing these conditions, consider adding braces around both the outer and inner if bodies to match the surrounding pattern.

Suggested change
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Enabled"))
set_syscfg_partner_values(value, "VoiceSupport_Enabled");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_IfaceName"))
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Mode"))
set_syscfg_partner_values(value, "VoiceSupport_Mode");
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Enabled"))
{
set_syscfg_partner_values(value, "VoiceSupport_Enabled");
}
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_IfaceName"))
{
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
}
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Mode"))
{
set_syscfg_partner_values(value, "VoiceSupport_Mode");
}
}

Copilot uses AI. Check for mistakes.
Comment on lines +1462 to +1472
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The new nested if-statements here omit braces, unlike the surrounding convention in this function (each key match uses a braced block). Please add braces around the new conditions to avoid future dangling-statement mistakes and keep style consistent.

Suggested change
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Enabled"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Enabled"))
set_syscfg_partner_values(value, "VoiceSupport_Enabled");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_IfaceName"))
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Mode"))
set_syscfg_partner_values(value, "VoiceSupport_Mode");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Enabled"))
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Enabled"))
{
set_syscfg_partner_values(value, "VoiceSupport_Enabled");
}
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_IfaceName"))
{
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
}
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Mode"))
{
set_syscfg_partner_values(value, "VoiceSupport_Mode");
}
}

Copilot uses AI. Check for mistakes.
Comment on lines +1462 to +1472
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.

The newly added VoiceSupport syscfg mappings use nested if statements without braces, unlike the surrounding code which consistently wraps these blocks in {}. This can trigger -Wmisleading-indentation and makes future edits error-prone (dangling else). Please add braces and align formatting with the existing if ( 0 == strcmp ( key, ... ) ) { ... } pattern used above.

Copilot uses AI. Check for mistakes.
Comment on lines +1463 to +1472
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The new VOICE_MTA_SUPPORT block uses nested single-line if statements without braces, unlike the surrounding code which consistently braces if bodies. This is brittle (easy to mis-edit and can lead to accidental mis-binding when lines are added). Please wrap these conditionals in braces (and consider using else if to make exclusivity explicit).

Suggested change
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Enabled"))
set_syscfg_partner_values(value, "VoiceSupport_Enabled");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_IfaceName"))
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Mode"))
set_syscfg_partner_values(value, "VoiceSupport_Mode");
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Enabled"))
{
set_syscfg_partner_values(value, "VoiceSupport_Enabled");
}
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_IfaceName"))
{
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
}
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
{
if (0 == IsValuePresentinSyscfgDB("VoiceSupport_Mode"))
{
set_syscfg_partner_values(value, "VoiceSupport_Mode");
}
}

Copilot uses AI. Check for mistakes.
Comment on lines +1461 to +1472
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

This VOICE_MTA_SUPPORT mapping is added only in apply_system_defaults.c, but the build also has a PARTNER_DEFAULT_EXT path that compiles apply_system_defaults_helper.c (see source/scripts/init/src/apply_system_defaults/Makefile.am). That helper currently does not set these VoiceSupport_* syscfg defaults, so behavior will differ depending on build configuration. Please mirror these additions in apply_system_defaults_helper.c (and any other relevant apply_system_defaults variants) to keep defaults consistent.

Copilot uses AI. Check for mistakes.
Comment on lines +1461 to +1472
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Test coverage: source/test/apply_system_defaults/apply_system_defaults_test.cpp exercises addInSysCfgdDB/updateSysCfgdDB, but there are no unit tests validating the new VoiceSupport_* key mappings. Since this logic is a set of string-to-syscfg mappings, please add tests (guarded with #ifdef VOICE_MTA_SUPPORT if needed) that verify the expected syscfg_set calls for the three new TR-181 keys.

Copilot uses AI. Check for mistakes.

#endif
if ( 0 == strcmp ( key, "Device.X_RDK_WebConfig.URL") )
{
Expand Down Expand Up @@ -1694,6 +1706,14 @@ STATIC void updateSysCfgdDB (char *key, char *value)
{
set_syscfg_partner_values( value,"IPv4SecondaryDhcpServerOptions" );
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Enabled"))
set_syscfg_partner_values(value, "VoiceSupport_Enabled");

if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");

if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
set_syscfg_partner_values(value, "VoiceSupport_Mode");
Comment on lines +1740 to +1747
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

Same concern as above: this change only affects apply_system_defaults.c, but PARTNER_DEFAULT_EXT builds use apply_system_defaults_syscfg.c + apply_system_defaults_helper.c instead. If SCXF10 (or any target needing these keys) uses PARTNER_DEFAULT_EXT, VoiceSupport_* updates won’t happen. Please replicate this mapping in the PARTNER_DEFAULT_EXT code path.

Copilot uses AI. Check for mistakes.
Comment on lines +1740 to +1747
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Same maintainability concern as above: the new VOICE_MTA_SUPPORT updates in updateSysCfgdDB are unbraced single-line ifs. Please add braces for consistency with the rest of this function and to reduce the chance of future edits accidentally changing control flow.

Suggested change
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Enabled"))
set_syscfg_partner_values(value, "VoiceSupport_Enabled");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
set_syscfg_partner_values(value, "VoiceSupport_Mode");
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Enabled"))
{
set_syscfg_partner_values(value, "VoiceSupport_Enabled");
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"))
{
set_syscfg_partner_values(value, "VoiceSupport_IfaceName");
}
if (0 == strcmp(key, "Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"))
{
set_syscfg_partner_values(value, "VoiceSupport_Mode");
}

Copilot uses AI. Check for mistakes.
#endif
if ( 0 == strcmp ( key, "Device.X_RDK_WebConfig.URL") )
{
Expand Down Expand Up @@ -3002,7 +3022,6 @@ static int apply_partnerId_default_values (char *data, char *PartnerID)
{
APPLY_PRINT("%s - Default Value of StartupIPMode is NULL\n", __FUNCTION__ );
}

paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem( partnerObj, "Default_VoIP_Configuration_FileName"), "ActiveValue");
if ( paramObjVal != NULL )
{
Expand Down Expand Up @@ -3077,6 +3096,51 @@ if ( paramObjVal != NULL )
{
APPLY_PRINT("%s - Default Value of Secondary dhcp server option is NULL\n", __FUNCTION__ );
}
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem(partnerObj,"Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Enabled"),"ActiveValue");
if(paramObjVal != NULL)
{
char *pVoiceSupportEnabled = NULL;
pVoiceSupportEnabled = paramObjVal->valuestring;
if(pVoiceSupportEnabled != NULL)
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing empty string validation before setting the value. The existing code pattern in this function consistently checks whether the string is not empty before calling set_syscfg_partner_values. For example, lines 3044 and 3059 check if the string's first character is not null terminator using conditions like "if(pridhcpoption[0]!='\0')". The new code checks if the pointer is not NULL but doesn't verify that the string is not empty, which could lead to setting empty values in the configuration.

Suggested change
if(pVoiceSupportEnabled != NULL)
if((pVoiceSupportEnabled != NULL) && (pVoiceSupportEnabled[0] != '\0'))

Copilot uses AI. Check for mistakes.
{
set_syscfg_partner_values(pVoiceSupportEnabled,"VoiceSupport_Enabled");
pVoiceSupportEnabled = NULL;
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Unnecessary pointer nullification. Setting the local pointer to NULL after use (line 3107) is unnecessary and inconsistent with similar code patterns. The pointer is a local variable that goes out of scope at the end of the if block, so nullifying it serves no purpose. While some other code in this file does this (e.g., lines 3018, 3047), many newer patterns like lines 3150-3155 don't, and it's considered an anti-pattern as it provides no actual benefit for local variables with limited scope.

Suggested change
pVoiceSupportEnabled = NULL;

Copilot uses AI. Check for mistakes.
}
else
{
APPLY_PRINT("%s - VoiceSupportEnabled Value is NULL\n", __FUNCTION__ );
}
Comment on lines +3142 to +3145
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The log message here says "Value is NULL", but this branch is also taken when the JSON value is an empty string ("""). Consider distinguishing between NULL vs empty (or changing the message to something like "missing/empty") so field debugging is accurate.

Copilot uses AI. Check for mistakes.
}
Comment on lines 3133 to 3146
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing else clause for error handling. The existing code pattern in this function consistently includes an else clause that prints an error message when the outer if condition fails (paramObjVal is NULL). For example, lines 3050-3053, 3065-3068, 3080-3083, and 3095-3098 all include an else clause with an APPLY_PRINT statement. The new code blocks should follow the same error handling pattern for consistency and debugging purposes.

Copilot uses AI. Check for mistakes.
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem(partnerObj,"Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"),"ActiveValue");
if(paramObjVal != NULL)
{
char *pVoiceSupportIfaceName = NULL;
pVoiceSupportIfaceName = paramObjVal->valuestring;
if(pVoiceSupportIfaceName != NULL)
{
set_syscfg_partner_values(pVoiceSupportIfaceName,"VoiceSupport_IfaceName");
pVoiceSupportIfaceName = NULL;
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Unnecessary pointer nullification. Setting the local pointer to NULL after use (line 3122) is unnecessary and inconsistent with similar code patterns. The pointer is a local variable that goes out of scope at the end of the if block, so nullifying it serves no purpose. While some other code in this file does this (e.g., lines 3018, 3047), many newer patterns like lines 3150-3155 don't, and it's considered an anti-pattern as it provides no actual benefit for local variables with limited scope.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing empty string validation before setting the value. The existing code pattern in this function consistently checks whether the string is not empty before calling set_syscfg_partner_values. For example, lines 3044 and 3059 check if the string's first character is not null terminator using conditions like "if(pridhcpoption[0]!='\0')". The new code checks if the pointer is not NULL but doesn't verify that the string is not empty, which could lead to setting empty values in the configuration.

Copilot uses AI. Check for mistakes.
}
else
{
APPLY_PRINT("%s - VoiceSupportIfaceName Value is NULL\n", __FUNCTION__ );
}
}
Comment on lines 3151 to 3164
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing else clause for error handling. The existing code pattern in this function consistently includes an else clause that prints an error message when the outer if condition fails (paramObjVal is NULL). For example, lines 3050-3053, 3065-3068, 3080-3083, and 3095-3098 all include an else clause with an APPLY_PRINT statement. The new code blocks should follow the same error handling pattern for consistency and debugging purposes.

Copilot uses AI. Check for mistakes.
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem(partnerObj,"Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"),"ActiveValue");
if(paramObjVal != NULL)
{
char *pVoiceSupportMode = NULL;
pVoiceSupportMode = paramObjVal->valuestring;
if(pVoiceSupportMode != NULL)
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.

Same issue for Mode: this sets VoiceSupport_Mode even when the JSON ActiveValue is an empty string. Please check for non-empty string before committing to syscfg to avoid persisting an effectively-unset value.

Suggested change
if(pVoiceSupportMode != NULL)
if((pVoiceSupportMode != NULL) && (*pVoiceSupportMode != '\0'))

Copilot uses AI. Check for mistakes.
{
set_syscfg_partner_values(pVoiceSupportMode,"VoiceSupport_Mode");
pVoiceSupportMode = NULL;
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing empty string validation before setting the value. The existing code pattern in this function consistently checks whether the string is not empty before calling set_syscfg_partner_values. For example, lines 3044 and 3059 check if the string's first character is not null terminator using conditions like "if(pridhcpoption[0]!='\0')". The new code checks if the pointer is not NULL but doesn't verify that the string is not empty, which could lead to setting empty values in the configuration.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Unnecessary pointer nullification. Setting the local pointer to NULL after use (line 3137) is unnecessary and inconsistent with similar code patterns. The pointer is a local variable that goes out of scope at the end of the if block, so nullifying it serves no purpose. While some other code in this file does this (e.g., lines 3018, 3047), many newer patterns like lines 3150-3155 don't, and it's considered an anti-pattern as it provides no actual benefit for local variables with limited scope.

Suggested change
pVoiceSupportMode = NULL;

Copilot uses AI. Check for mistakes.
}
else
{
APPLY_PRINT("%s - VoiceSupportMode Value is NULL\n", __FUNCTION__ );
Comment on lines 3136 to 3180
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

In apply_partnerId_default_values, the new VoiceSupport values are written to syscfg even when the JSON value is an empty string. Nearby parameters check for non-empty strings before applying defaults (e.g., StartupIPMode, DHCP options). Consider also verifying the cJSON item is a string and non-empty before calling set_syscfg_partner_values to avoid clobbering defaults with empty values.

Suggested change
char *pVoiceSupportEnabled = NULL;
pVoiceSupportEnabled = paramObjVal->valuestring;
if(pVoiceSupportEnabled != NULL)
{
set_syscfg_partner_values(pVoiceSupportEnabled,"VoiceSupport_Enabled");
pVoiceSupportEnabled = NULL;
}
else
{
APPLY_PRINT("%s - VoiceSupportEnabled Value is NULL\n", __FUNCTION__ );
}
}
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem(partnerObj,"Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"),"ActiveValue");
if(paramObjVal != NULL)
{
char *pVoiceSupportIfaceName = NULL;
pVoiceSupportIfaceName = paramObjVal->valuestring;
if(pVoiceSupportIfaceName != NULL)
{
set_syscfg_partner_values(pVoiceSupportIfaceName,"VoiceSupport_IfaceName");
pVoiceSupportIfaceName = NULL;
}
else
{
APPLY_PRINT("%s - VoiceSupportIfaceName Value is NULL\n", __FUNCTION__ );
}
}
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem(partnerObj,"Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"),"ActiveValue");
if(paramObjVal != NULL)
{
char *pVoiceSupportMode = NULL;
pVoiceSupportMode = paramObjVal->valuestring;
if(pVoiceSupportMode != NULL)
{
set_syscfg_partner_values(pVoiceSupportMode,"VoiceSupport_Mode");
pVoiceSupportMode = NULL;
}
else
{
APPLY_PRINT("%s - VoiceSupportMode Value is NULL\n", __FUNCTION__ );
if(cJSON_IsString(paramObjVal) && (paramObjVal->valuestring != NULL) && (paramObjVal->valuestring[0] != '\0'))
{
set_syscfg_partner_values(paramObjVal->valuestring,"VoiceSupport_Enabled");
}
else
{
APPLY_PRINT("%s - VoiceSupportEnabled Value is NULL or empty or not a string\n", __FUNCTION__ );
}
}
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem(partnerObj,"Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.InterfaceName"),"ActiveValue");
if(paramObjVal != NULL)
{
if(cJSON_IsString(paramObjVal) && (paramObjVal->valuestring != NULL) && (paramObjVal->valuestring[0] != '\0'))
{
set_syscfg_partner_values(paramObjVal->valuestring,"VoiceSupport_IfaceName");
}
else
{
APPLY_PRINT("%s - VoiceSupportIfaceName Value is NULL or empty or not a string\n", __FUNCTION__ );
}
}
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem(partnerObj,"Device.X_RDKCENTRAL-COM_Epon_MTA.VoiceSupport.Mode"),"ActiveValue");
if(paramObjVal != NULL)
{
if(cJSON_IsString(paramObjVal) && (paramObjVal->valuestring != NULL) && (paramObjVal->valuestring[0] != '\0'))
{
set_syscfg_partner_values(paramObjVal->valuestring,"VoiceSupport_Mode");
}
else
{
APPLY_PRINT("%s - VoiceSupportMode Value is NULL or empty or not a string\n", __FUNCTION__ );

Copilot uses AI. Check for mistakes.
}
}
Comment on lines 3169 to 3182
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing else clause for error handling. The existing code pattern in this function consistently includes an else clause that prints an error message when the outer if condition fails (paramObjVal is NULL). For example, lines 3050-3053, 3065-3068, 3080-3083, and 3095-3098 all include an else clause with an APPLY_PRINT statement. The new code blocks should follow the same error handling pattern for consistency and debugging purposes.

Copilot uses AI. Check for mistakes.
Comment on lines 3133 to 3182
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The indentation of the newly added VoiceSupport block is inconsistent with the surrounding code in this function (many adjacent statements are unindented or use a different tab depth). Please reformat this block to match the local indentation style to keep future edits safe and readable.

Copilot uses AI. Check for mistakes.
#endif
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem( partnerObj, "Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.WANsideSSH.Enable"), "ActiveValue");
if ( paramObjVal != NULL )
Expand Down
Loading