Skip to content

Commit a3cf0c9

Browse files
Merge branch 'develop' into RDKB-60436-Test
2 parents 23c8040 + 7026fd7 commit a3cf0c9

18 files changed

+968
-123
lines changed

source-arm/TR-181/board_sbapi/cosa_dhcpv6_apis.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2973,11 +2973,7 @@ static int _write_dibbler_sent_option_file(void)
29732973
for (i=0; i<g_sent_option_num; i++)
29742974
{
29752975
if (g_sent_options[i].bEnabled)
2976-
#if !defined(_64BIT_ARCH_SUPPORT_)
2977-
fprintf(fp, "%lu:%d:%s\n",
2978-
#else
29792976
fprintf(fp, "%lu:%zu:%s\n",
2980-
#endif
29812977
g_sent_options[i].Tag,
29822978
strlen((const char*)g_sent_options[i].Value)/2,
29832979
g_sent_options[i].Value);
@@ -11004,11 +11000,7 @@ dhcpv6c_dbg_thrd(void * in)
1100411000
if (strlen(globalIP2) != 0 )
1100511001
{
1100611002
g_dhcpv6s_refresh_count = bRestartLan;
11007-
#if !defined(_64BIT_ARCH_SUPPORT_)
11008-
CcspTraceWarning(("%s: g_dhcpv6s_refresh_count %ld, globalIP2 is %s, strlen is %d\n", __func__, g_dhcpv6s_refresh_count,globalIP2,strlen(globalIP2)));
11009-
#else
1101011003
CcspTraceWarning(("%s: g_dhcpv6s_refresh_count %ld, globalIP2 is %s, strlen is %zu\n", __func__, g_dhcpv6s_refresh_count,globalIP2,strlen(globalIP2)));
11011-
#endif
1101211004
}
1101311005

1101411006
rc = strcpy_s(globalIP2, sizeof(globalIP2), globalIP);

source-arm/TR-181/board_sbapi/cosa_managedwifi_webconfig_apis.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,11 +2358,7 @@ void getBridgeDetailsFromPsm(void)
23582358
}
23592359

23602360
snprintf(aParamName, BUFF_LEN_64, l2netBridgeName, sManageWiFiInfo.aBridgeIndex);
2361-
#if !defined(_64BIT_ARCH_SUPPORT_)
2362-
CcspTraceInfo(("%s: aBridgeName=%d\n", __FUNCTION__,sizeof(sManageWiFiInfo.aBridgeName)));
2363-
#else
23642361
CcspTraceInfo(("%s: aBridgeName=%zu\n", __FUNCTION__,sizeof(sManageWiFiInfo.aBridgeName)));
2365-
#endif
23662362
CcspTraceInfo(("%s: aParamName=%s\n", __FUNCTION__,aParamName));
23672363

23682364
/* CID 347167 Unchecked return value fix */

source-arm/TR-181/board_sbapi/cosa_upnp_apis.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,7 @@ CosaDmlUpnpDevGetAdvPeriod
289289
Utopia_RawGet(&utctx, NULL, "upnp_igd_advr_expire", buf, sizeof(buf));
290290

291291
if (AnscSizeOfString(buf)){
292-
#if !defined(_64BIT_ARCH_SUPPORT_)
293-
*val = (PULONG)_ansc_atoi(buf);
294-
#else
295-
*val = (PULONG)_ansc_atol(buf);
296-
#endif
292+
*val = (PULONG)*val = (PULONG)strtoul(buf, NULL, 10);
297293
}else{
298294
*val = (PULONG)g_AdvPeriod; // use default value
299295
}
@@ -348,11 +344,7 @@ CosaDmlUpnpDevGetTTL
348344
Utopia_RawGet(&utctx, NULL, "upnp_igd_advr_ttl", buf, sizeof(buf));
349345

350346
if (AnscSizeOfString(buf)){
351-
#if !defined(_64BIT_ARCH_SUPPORT_)
352-
*val = (PULONG)_ansc_atoi(buf);
353-
#else
354-
*val = (PULONG)_ansc_atol(buf);
355-
#endif
347+
*val = (PULONG)strtoul(buf, NULL, 10);
356348
}else{
357349
*val = (PULONG)g_TTL; // use default value
358350
}

source-arm/TR-181/board_sbapi/cosa_x_cisco_com_security_apis.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,11 +2436,7 @@ static int be_struct_2_middle_layer(iap_entry_t * p_in, PCOSA_DML_IA_POLICY p_ou
24362436
p_out->LanHost.IpCount = p_in->lanhosts.ip_count;
24372437
p_out->LanHost.IprCount = p_in->lanhosts.iprange_count;
24382438

2439-
#if !defined(_64BIT_ARCH_SUPPORT_)
2440-
printf("sizeof(iap_entry_t) %d \n", sizeof(iap_entry_t));
2441-
#else
24422439
printf("sizeof(iap_entry_t) %zu \n", sizeof(iap_entry_t));
2443-
#endif
24442440

24452441
for (i=0; i<p_out->LanHost.MacCount && i<COSA_DML_IA_LH_MAX_MAC; i++)
24462442
{

source-arm/TR-181/board_sbapi/speedboost_webconfig_apis.c

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <stdlib.h>
2222
#include <string.h>
2323
#include <stdbool.h>
24+
#include <inttypes.h>
2425
#include "ansc_platform.h"
2526
#include "webconfig_framework.h"
2627
#include "cosa_webconfig_api.h"
@@ -91,11 +92,7 @@ bool validateUnixTime(int64_t unixTime, char * pErrMessage, int iSizeOfBuffer)
9192
bool bRet = true;
9293

9394
currentTime = (int64_t)time(NULL);
94-
#ifdef _64BIT_ARCH_SUPPORT_
95-
CcspTraceInfo(("%s:%d, unixTime = %ld\n", __FUNCTION__, __LINE__, unixTime));
96-
#else
97-
CcspTraceInfo(("%s:%d, unixTime = %lld\n", __FUNCTION__, __LINE__, unixTime));
98-
#endif
95+
CcspTraceInfo(("%s:%d, unixTime = %" PRId64 "\n", __FUNCTION__, __LINE__, unixTime));
9996
if (unixTime > (currentTime + NINETY_DAYS_IN_SECONDS))
10097
{
10198
CcspTraceError (("%s:%d, The Unix time is more than 90 days from now.\n", __FUNCTION__, __LINE__));
@@ -222,13 +219,8 @@ pErr processSpeedBoostWebConfigRequest(void *pVoidData)
222219
snprintf(execRetVal->ErrorMsg, sizeof(execRetVal->ErrorMsg) - 1, "%s", "NULL pointer passed for absolute");
223220
return execRetVal;
224221
}
225-
#ifdef _64BIT_ARCH_SUPPORT_
226-
CcspTraceInfo(("%s:%d, Number of Unix Time: %ld\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->absolute_size));
227-
CcspTraceInfo(("%s:%d, Number of Mac Addresses: %ld\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->actions_size));
228-
#else
229-
CcspTraceInfo(("%s:%d, Number of Unix Time: %d\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->absolute_size));
230-
CcspTraceInfo(("%s:%d, Number of Mac Addresses: %d\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->actions_size));
231-
#endif
222+
CcspTraceInfo(("%s:%d, Number of Unix Time: %zu\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->absolute_size));
223+
CcspTraceInfo(("%s:%d, Number of Mac Addresses: %zu\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->actions_size));
232224

233225
for (size_t iVar = 0; iVar < pSpeedBoostDoc->pSchedulerInfo->absolute_size; iVar++)
234226
{
@@ -245,11 +237,7 @@ pErr processSpeedBoostWebConfigRequest(void *pVoidData)
245237

246238
if (MAX_MAC_ADDR_COUNT < pSpeedBoostDoc->pSchedulerInfo->actions_size)
247239
{
248-
#ifdef _64BIT_ARCH_SUPPORT_
249-
CcspTraceError(("%s:%d, Number of Mac Addresses(%ld) exceeds the limit\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->actions_size));
250-
#else
251-
CcspTraceError(("%s:%d, Number of Mac Addresses(%d) exceeds the limit\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->actions_size));
252-
#endif
240+
CcspTraceError(("%s:%d, Number of Mac Addresses(%zu) exceeds the limit\n", __FUNCTION__, __LINE__, pSpeedBoostDoc->pSchedulerInfo->actions_size));
253241
execRetVal->ErrorCode = VALIDATION_FALIED;
254242
snprintf(execRetVal->ErrorMsg, sizeof(execRetVal->ErrorMsg) - 1, "%s", "Number of Mac Addresses exceeds the limit");
255243
return execRetVal;
@@ -284,11 +272,7 @@ pErr processSpeedBoostWebConfigRequest(void *pVoidData)
284272
else
285273
{
286274
iSpeedBoostClientsCount++;
287-
#ifdef _64BIT_ARCH_SUPPORT_
288-
CcspTraceInfo(("%s:%d, MAC Address[%ld]:%s is Valid\n", __FUNCTION__, __LINE__, iVar, pMac));
289-
#else
290-
CcspTraceInfo(("%s:%d, MAC Address[%d]:%s is Valid\n", __FUNCTION__, __LINE__, iVar, pMac));
291-
#endif
275+
CcspTraceInfo(("%s:%d, MAC Address[%zu]:%s is Valid\n", __FUNCTION__, __LINE__, iVar, pMac));
292276
free(pMac);
293277
}
294278
}

source/TR-181/middle_layer_src/cosa_apis_util.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,11 +1009,7 @@ CosaUtilConstructLowerLayers
10091009
}
10101010
}
10111011

1012-
#if !defined(_64BIT_ARCH_SUPPORT_)
1013-
AnscTraceFlow(("%s, size %d, buf len %lu\n", pLowerLayersBuf, _ansc_strlen(pLowerLayersBuf), *pBufLen));
1014-
#else
10151012
AnscTraceFlow(("%s, size %zu, buf len %lu\n", pLowerLayersBuf, _ansc_strlen(pLowerLayersBuf), *pBufLen));
1016-
#endif
10171013
return ANSC_STATUS_SUCCESS;
10181014
}
10191015

source/TR-181/middle_layer_src/cosa_dhcpv4_dml.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3941,11 +3941,7 @@ Server_SetParamStringValue
39413941
}
39423942
if (NULL != pStaticClients)
39433943
{
3944-
#if !defined(_64BIT_ARCH_SUPPORT_)
3945-
CcspTraceWarning(("pStaticClients->entries_count is %u\n", pStaticClients->entries_count));
3946-
#else
39473944
CcspTraceWarning(("pStaticClients->entries_count is %zu\n", pStaticClients->entries_count));
3948-
#endif
39493945

39503946
CcspTraceWarning(("pStaticClients->subdoc_name is %s\n", pStaticClients->subdoc_name));
39513947
CcspTraceWarning(("pStaticClients->version is %lu\n", (unsigned long)pStaticClients->version));
@@ -4036,11 +4032,7 @@ Server_SetParamStringValue
40364032
if (NULL != pLanInfo)
40374033
{
40384034
pLanInfo->entries_count = 1;// Assigned 1 by default.
4039-
#if !defined(_64BIT_ARCH_SUPPORT_)
4040-
CcspTraceWarning(("pLanInfo->entries_count is %u\n", pLanInfo->entries_count));
4041-
#else
40424035
CcspTraceWarning(("pLanInfo->entries_count is %zu\n", pLanInfo->entries_count));
4043-
#endif
40444036
CcspTraceWarning(("pLanInfo->subdoc_name is %s\n", pLanInfo->subdoc_name));
40454037
CcspTraceWarning(("pLanInfo->version is %lu\n", (unsigned long)pLanInfo->version));
40464038
CcspTraceWarning(("pLanInfo->transaction_id is %d\n", pLanInfo->transaction_id));
@@ -6088,11 +6080,7 @@ Pool_GetParamStringValue
60886080
CosaDmlDhcpsGetPoolCfg(NULL,&tmpCfg);
60896081
snprintf(pValue,sizeof(tmpCfg.DomainName),"%s", tmpCfg.DomainName);
60906082
}else {
6091-
#if !defined(_64BIT_ARCH_SUPPORT_)
6092-
CcspTraceWarning(("%s: pPool->Cfg.DomainName: %s 0x%1x 0x%1x 0x%1x 0x%1x, sizeof: %d\n",
6093-
#else
60946083
CcspTraceWarning(("%s: pPool->Cfg.DomainName: %s 0x%1x 0x%1x 0x%1x 0x%1x, sizeof: %zu\n",
6095-
#endif
60966084
__FUNCTION__, pPool->Cfg.DomainName, (signed) (pPool->Cfg.DomainName[0]),
60976085
(signed) (pPool->Cfg.DomainName[1]), (signed) (pPool->Cfg.DomainName[2]),
60986086
(signed) (pPool->Cfg.DomainName[3]), sizeof(pPool->Cfg.DomainName)));
@@ -7948,11 +7936,7 @@ StaticAddress_SetParamStringValue
79487936
}
79497937
else
79507938
{
7951-
#if !defined(_64BIT_ARCH_SUPPORT_)
7952-
CcspTraceWarning(("'%s' value should be less than (%d) charecters\n", ParamName, ( sizeof(pDhcpStaticAddress->DeviceName) - 1 )));
7953-
#else
79547939
CcspTraceWarning(("'%s' value should be less than (%zu) charecters\n", ParamName, ( sizeof(pDhcpStaticAddress->DeviceName) - 1 )));
7955-
#endif
79567940
}
79577941
}
79587942

@@ -7971,11 +7955,7 @@ StaticAddress_SetParamStringValue
79717955
}
79727956
else
79737957
{
7974-
#if !defined(_64BIT_ARCH_SUPPORT_)
7975-
CcspTraceWarning(("'%s' value should be less than (%d) charecters\n", ParamName, ( sizeof(pDhcpStaticAddress->Comment) - 1 )));
7976-
#else
79777958
CcspTraceWarning(("'%s' value should be less than (%zu) charecters\n", ParamName, ( sizeof(pDhcpStaticAddress->Comment) - 1 )));
7978-
#endif
79797959
}
79807960
}
79817961

source/TR-181/middle_layer_src/cosa_nat_dml.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2971,11 +2971,7 @@ X_RDK_PortMapping_SetParamStringValue
29712971
{
29722972

29732973

2974-
#if !defined(_64BIT_ARCH_SUPPORT_)
2975-
CcspTraceWarning(("rpm->entries_count is %u\n", rpm->entries_count));
2976-
#else
29772974
CcspTraceWarning(("rpm->entries_count is %zu\n", rpm->entries_count));
2978-
#endif
29792975
CcspTraceWarning(("rpm->subdoc_name is %s\n", rpm->subdoc_name));
29802976
CcspTraceWarning(("rpm->version is %lu\n", (unsigned long)rpm->version));
29812977
CcspTraceWarning(("rpm->transaction_id is %d\n", rpm->transaction_id));

source/TR-181/middle_layer_src/cosa_routing_dml.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,11 +1402,7 @@ X_CISCO_COM_StaticIPv4Forwarding_AddEntry
14021402
*pInsNumber = pCxtLink->InstanceNumber;
14031403

14041404
/* We give a permenant name here*/
1405-
#if !defined(_64BIT_ARCH_SUPPORT_)
1406-
rc = sprintf_s(pEntry->Name, sizeof(pEntry->Name),"StaticRoute_%x_%lu", (UINT)pEntry, pCxtLink->InstanceNumber );
1407-
#else
14081405
rc = sprintf_s(pEntry->Name, sizeof(pEntry->Name),"StaticRoute_%p_%lu", pEntry, pCxtLink->InstanceNumber );
1409-
#endif
14101406
if(rc < EOK)
14111407
{
14121408
ERR_CHK(rc);

source/TR-181/middle_layer_src/cosa_webconfig_api.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,7 @@ int set_portmap_conf(portmappingdoc_t *rpm)
450450
int pfr_count = 0;
451451
char alias_pre[8];
452452
errno_t rc = -1;
453-
#if !defined(_64BIT_ARCH_SUPPORT_)
454-
printf("Port map entries %d\n",rpm->entries_count);
455-
#else
456453
printf("Port map entries %zu\n",rpm->entries_count);
457-
#endif
458454
//printf("SinglePortForwardCount = %d\n", rpm->entries_count);
459455
//count = rpm->entries_count + 1;
460456
for(i = 1,j =0; i < rpm->entries_count+1; i++, j++ )
@@ -704,11 +700,7 @@ pErr Process_PF_WebConfigRequest(void *Data)
704700
portmappingdoc_t *rpm = (portmappingdoc_t *) Data ;
705701

706702

707-
#if !defined(_64BIT_ARCH_SUPPORT_)
708-
CcspTraceWarning(("rpm->entries_count is %d\n", rpm->entries_count));
709-
#else
710703
CcspTraceWarning(("rpm->entries_count is %zu\n", rpm->entries_count));
711-
#endif
712704
CcspTraceWarning(("Portmap configurartion recieved\n"));
713705

714706

0 commit comments

Comments
 (0)