Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
10 changes: 10 additions & 0 deletions source/firewall/firewall.c
Original file line number Diff line number Diff line change
Expand Up @@ -12546,6 +12546,16 @@ static int prepare_subtables(FILE *raw_fp, FILE *mangle_fp, FILE *nat_fp, FILE *
updateAmenityNetworkRules(filter_fp,mangle_fp , AF_INET);
#endif
}
#if defined(VOICE_MTA_SUPPORT)
char cVoiceRule[64] = {0};
sysevent_get(sysevent_fd, sysevent_token, "VoiceIpRule", cVoiceRule, sizeof(cVoiceRule));
FIREWALL_DEBUG("%s: VoiceIpRule=%s\n" COMMA __FUNCTION__ COMMA cVoiceRule);
if (strlen(cVoiceRule) > 0)
{
Comment on lines +12550 to +12554
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.

VoiceIpRule is read into a 64-byte buffer and then written verbatim into the iptables-restore file. 64 bytes is likely too small for a full iptables rule; truncation could produce an invalid/partial rule that breaks firewall restore. Please use a larger buffer consistent with nearby code (e.g., MAX_QUERY) and/or detect truncation / check sysevent_get() return before applying.

Suggested change
char cVoiceRule[64] = {0};
sysevent_get(sysevent_fd, sysevent_token, "VoiceIpRule", cVoiceRule, sizeof(cVoiceRule));
FIREWALL_DEBUG("%s: VoiceIpRule=%s\n" COMMA __FUNCTION__ COMMA cVoiceRule);
if (strlen(cVoiceRule) > 0)
{
char cVoiceRule[MAX_QUERY] = {0};
int se_rc = sysevent_get(sysevent_fd, sysevent_token, "VoiceIpRule", cVoiceRule, sizeof(cVoiceRule));
if (se_rc != 0)
{
FIREWALL_DEBUG("%s: sysevent_get VoiceIpRule failed rc=%d\n" COMMA __FUNCTION__ COMMA se_rc);
}
else if (cVoiceRule[0] != '\0')
{
FIREWALL_DEBUG("%s: VoiceIpRule=%s\n" COMMA __FUNCTION__ COMMA cVoiceRule);

Copilot uses AI. Check for mistakes.
fprintf(filter_fp,"%s\n", cVoiceRule);
FIREWALL_DEBUG("%s: Applied VoiceIpRule\n" COMMA __FUNCTION__);
}
#endif
//Add wan2self restrictions to other wan interfaces
//ping is allowed to cm and mta inferfaces regardless the firewall level
#if !defined(_HUB4_PRODUCT_REQ_)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,19 @@ STATIC void addInSysCfgdDB (char *key, char *value)
}
}
#endif
#if defined (VOICE_MTA_SUPPORT)
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 /*VOICE_MTA_SUPPORT*/
if ( 0 == strcmp ( key, "Device.X_RDK_WebConfig.URL") )
{
if ( 0 == IsValuePresentinSyscfgDB( "WEBCONFIG_INIT_URL" ) )
Expand Down Expand Up @@ -1723,6 +1736,16 @@ STATIC void updateSysCfgdDB (char *key, char *value)
set_syscfg_partner_values( value,"IPv4SecondaryDhcpServerOptions" );
}
#endif
#if defined (VOICE_MTA_SUPPORT)
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 /*VOICE_MTA_SUPPORT*/
if ( 0 == strcmp ( key, "Device.X_RDK_WebConfig.URL") )
{
set_syscfg_partner_values( value,"WEBCONFIG_INIT_URL" );
Expand Down Expand Up @@ -3030,7 +3053,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 @@ -3105,7 +3127,64 @@ if ( paramObjVal != NULL )
{
APPLY_PRINT("%s - Default Value of Secondary dhcp server option is NULL\n", __FUNCTION__ );
}

#endif
#if defined (VOICE_MTA_SUPPORT)
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 && pVoiceSupportEnabled[0] != '\0')
{
set_syscfg_partner_values(pVoiceSupportEnabled,"VoiceSupport_Enabled");
}
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.
else
{
APPLY_PRINT("%s - VoiceSupportEnabled Object 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 && pVoiceSupportIfaceName[0] != '\0')
{
set_syscfg_partner_values(pVoiceSupportIfaceName,"VoiceSupport_IfaceName");
}
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.
else
{
APPLY_PRINT("%s - VoiceSupportIfaceName Object 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 && pVoiceSupportMode[0] != '\0')
{
set_syscfg_partner_values(pVoiceSupportMode,"VoiceSupport_Mode");
}
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.
else
{
APPLY_PRINT("%s - VoiceSupportMode Object is NULL\n", __FUNCTION__ );
}
#endif /*VOICE_MTA_SUPPORT*/
paramObjVal = cJSON_GetObjectItem(cJSON_GetObjectItem( partnerObj, "Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.WANsideSSH.Enable"), "ActiveValue");
if ( paramObjVal != NULL )
{
Expand Down
Loading