Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/cosa/package/system/components/SysRepositoryFolder/sys_rfo_sorting.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/cosa/package/system/components/SysRepositoryFolder/sys_rfo_sorting.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 537 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/cosa/package/system/components/SysRepositoryFolder/sys_rfo_sorting.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -139,12 +139,15 @@
pMyObject->FolderSortingType = SYS_RFO_SORTING_TYPE_BYTIME;
}

AnscAcquireLock(&pMyObject->FolderTableLock);
if ( !pMyObject->FolderArray || (pMyObject->FolderArrayCurLen == 0) )
{
AnscReleaseLock(&pMyObject->FolderTableLock);
return ANSC_STATUS_SUCCESS;
}
else
{
AnscReleaseLock(&pMyObject->FolderTableLock);
pTmpFolderArray = (ANSC_HANDLE*)AnscAllocateMemory(sizeof(ANSC_HANDLE) * pMyObject->FolderArrayMaxLen);

if ( !pTmpFolderArray )
Expand Down Expand Up @@ -250,12 +253,15 @@
pMyObject->FolderSortingType = SYS_RFO_SORTING_TYPE_BYNAME;
}

AnscAcquireLock(&pMyObject->FolderTableLock);
if ( !pMyObject->FolderArray || (pMyObject->FolderArrayCurLen == 0) )
{
AnscReleaseLock(&pMyObject->FolderTableLock);
return ANSC_STATUS_SUCCESS;
}
else
{
AnscReleaseLock(&pMyObject->FolderTableLock);
pTmpFolderArray = (ANSC_HANDLE*)AnscAllocateMemory(sizeof(ANSC_HANDLE) * pMyObject->FolderArrayMaxLen);

if ( !pTmpFolderArray )
Expand Down Expand Up @@ -365,12 +371,15 @@
pMyObject->RecordSortingType = SYS_RFO_SORTING_TYPE_BYTIME;
}

AnscAcquireLock(&pMyObject->RecordTableLock);
if ( !pMyObject->RecordArray || (pMyObject->RecordArrayCurLen == 0) )
{
AnscReleaseLock(&pMyObject->RecordTableLock);
return ANSC_STATUS_SUCCESS;
}
else
{
AnscReleaseLock(&pMyObject->RecordTableLock);
pTmpRecordArray = (ANSC_HANDLE*)AnscAllocateMemory(sizeof(ANSC_HANDLE) * pMyObject->RecordArrayMaxLen);

if ( !pTmpRecordArray )
Expand All @@ -380,7 +389,6 @@
}

AnscAcquireLock(&pMyObject->RecordTableLock);

for ( k = 0; k < pMyObject->RecordArrayCurLen; k++ )
{
pTbsRecord = (PSYS_REPOSITORY_RECORD_OBJECT)pMyObject->RecordArray[k];
Expand Down Expand Up @@ -476,12 +484,15 @@
pMyObject->RecordSortingType = SYS_RFO_SORTING_TYPE_BYNAME;
}

AnscAcquireLock(&pMyObject->RecordTableLock);
if ( !pMyObject->RecordArray || (pMyObject->RecordArrayCurLen == 0) )
{
AnscReleaseLock(&pMyObject->RecordTableLock);
return ANSC_STATUS_SUCCESS;
}
else
{
AnscReleaseLock(&pMyObject->RecordTableLock);
pTmpRecordArray = (ANSC_HANDLE*)AnscAllocateMemory(sizeof(ANSC_HANDLE) * pMyObject->RecordArrayMaxLen);

if ( !pTmpRecordArray )
Expand Down
24 changes: 12 additions & 12 deletions source/debug_api/ansc_memory.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/debug_api/ansc_memory.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/debug_api/ansc_memory.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 1548 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/debug_api/ansc_memory.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -332,14 +332,14 @@
{
void* pMemoryPointer = NULL;

AnscInitializeSpinLock(&g_tCountSizeSpinLock);
AnscAcquireSpinLock(&g_tCountSizeSpinLock);
if ( !g_bCountSizeInitialized )
{
AnscInitializeSpinLock(&g_tCountSizeSpinLock);

AnscAcquireSpinLock(&g_tCountSizeSpinLock);
g_bCountSizeInitialized = TRUE;
AnscReleaseSpinLock(&g_tCountSizeSpinLock);
}
AnscReleaseSpinLock(&g_tCountSizeSpinLock);

pMemoryPointer = AnscAllocateMemoryOrig(ulMemorySize + sizeof(ULONG));

Expand Down Expand Up @@ -1022,23 +1022,23 @@
" AnscAllocateMemoryRecordDetail 1 \n"
));*/

AnscInitializeSpinLock(&g_tCountSizeSpinLock);

AnscAcquireSpinLock(&g_tCountSizeSpinLock);
if ( !g_bCountSizeInitialized )
{
AnscInitializeSpinLock(&g_tCountSizeSpinLock);

AnscAcquireSpinLock(&g_tCountSizeSpinLock);
g_bCountSizeInitialized = TRUE;
AnscReleaseSpinLock(&g_tCountSizeSpinLock);
}
AnscReleaseSpinLock(&g_tCountSizeSpinLock);
AnscInitializeSpinLock(&g_tRecordDetailSpinLock);
AnscInitializeMemoryAllocTable();

AnscAcquireSpinLock(&g_tRecordDetailSpinLock);
if ( !g_bRecordDetailInitialized )
{
AnscInitializeSpinLock(&g_tRecordDetailSpinLock);
AnscInitializeMemoryAllocTable();

AnscAcquireSpinLock(&g_tRecordDetailSpinLock);
g_bRecordDetailInitialized = TRUE;
AnscReleaseSpinLock(&g_tRecordDetailSpinLock);
}
AnscReleaseSpinLock(&g_tRecordDetailSpinLock);
/*CcspTraceError
((
" AnscAllocateMemoryRecordDetail 2 \n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/util_api/ansc/AnscBrokerEngineTcp/ansc_beto_management.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/util_api/ansc/AnscBrokerEngineTcp/ansc_beto_management.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 809 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/util_api/ansc/AnscBrokerEngineTcp/ansc_beto_management.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -296,10 +296,13 @@

/*AnscTrace("AnscBetoAddSocket!\n dstinationaddress %X dst_port %X src_port %X",*(PULONG)dst_addr,dst_port,src_port);*/

AnscAcquireLock (&pMyObject->SocketTableLock);
if ( pMyObject->CurSocketCount >= pMyObject->MaxSocketCount )
{
AnscReleaseLock (&pMyObject->SocketTableLock);
return (ANSC_HANDLE)NULL;
}
AnscReleaseLock (&pMyObject->SocketTableLock);

pSocket =
(PANSC_BROKER_SOCKET_TCP_OBJECT)pMyObject->GetSocketByAddr
Expand Down
4 changes: 4 additions & 0 deletions source/util_api/ansc/AnscPlatform/ansc_http_parser.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/util_api/ansc/AnscPlatform/ansc_http_parser.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/util_api/ansc/AnscPlatform/ansc_http_parser.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 10415 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/util_api/ansc/AnscPlatform/ansc_http_parser.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -8101,6 +8101,10 @@
{
ulCount --;
}
else
{
return (ANSC_HANDLE)pHfoCookie;
}

pHfoCookie =
(PHTTP_HFO_COOKIE)AnscAllocateMemory
Expand Down
12 changes: 9 additions & 3 deletions source/util_api/ansc/AnscPlatform/ansc_packet.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/util_api/ansc/AnscPlatform/ansc_packet.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/util_api/ansc/AnscPlatform/ansc_packet.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 2541 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/util_api/ansc/AnscPlatform/ansc_packet.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -322,8 +322,10 @@
* race condition may occur for the queue size, but it can only make the
* pool a little bit over-limit and should not matter.
*/
AnscAcquireSpinLock(&g_qPdoPoolSpinLock);
if ( AnscSListQueryDepth(&g_qPdoPoolList) >= g_ulMaxPdoPoolSize )
{
AnscReleaseSpinLock(&g_qPdoPoolSpinLock);
#ifdef _ANSC_TRACE_PACKET_
AnscTraceWarning(("@@ AnscPacket: Pdo pool over limit %d !!! -- Size limit %d.\n",
g_ulFreePdo ++, g_ulMaxPdoPoolSize));
Expand All @@ -332,6 +334,7 @@
}
else
{
AnscReleaseSpinLock(&g_qPdoPoolSpinLock);
#ifndef _ANSC_TRACE_PACKET_
AnscPdoClean((ANSC_HANDLE)pPdo);
#else
Expand Down Expand Up @@ -1742,8 +1745,10 @@
* race condition may occur for the queue size, but it can only make the
* pool a little bit over-limit and should not matter.
*/
AnscAcquireSpinLock(&g_qBdoPoolSpinLock);
if ( AnscSListQueryDepth(&g_qBdoPoolList) >= g_ulMaxBdoPoolSize )
{
AnscReleaseSpinLock(&g_qBdoPoolSpinLock);
#ifdef _ANSC_TRACE_PACKET_
AnscTraceWarning(("@@ AnscPacket: Bdo Pool over limit %d !!! -- Size limit %d.\n",
++g_ulFreeBdo, g_ulMaxBdoPoolSize));
Expand All @@ -1753,8 +1758,6 @@
else
{
AnscBdoClean((ANSC_HANDLE)pBdo);

AnscAcquireSpinLock(&g_qBdoPoolSpinLock);
AnscSListPushEntry(&g_qBdoPoolList, &pBdo->Linkage);
AnscReleaseSpinLock(&g_qBdoPoolSpinLock);
}
Expand Down Expand Up @@ -2167,19 +2170,22 @@
* race condition may occur for the queue size, but it can only make the
* pool a little bit over-limit and should not matter.
*/
AnscAcquireSpinLock(&g_qBdoPoolSpinLock);
if ( AnscSListQueryDepth(&g_qBdoPoolList) >= g_ulMaxBdoPoolSize )
{
#ifdef _ANSC_TRACE_PACKET_
AnscTraceWarning(("@@ AnscPacket: Bdo pool over limit %d !!! -- Size limt %d.\n",
++g_ulFreeBdo, g_ulMaxBdoPoolSize));
#endif
AnscReleaseSpinLock(&g_qBdoPoolSpinLock);
AnscFreeMemory(pSonBdo);
}
else
{
AnscBdoClean((ANSC_HANDLE)pSonBdo);

AnscAcquireSpinLock(&g_qBdoPoolSpinLock);
/* Hold the lock from size check through push operation */
/* The lock is already held from line 2176 */
AnscSListPushEntry(&g_qBdoPoolList, &pSonBdo->Linkage);
AnscReleaseSpinLock(&g_qBdoPoolSpinLock);
}
Expand Down
3 changes: 2 additions & 1 deletion source/util_api/ansc/AnscPlatform/ansc_protection.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/util_api/ansc/AnscPlatform/ansc_protection.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/util_api/ansc/AnscPlatform/ansc_protection.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/1, 564 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/RDKB-TEST-RELEASE-1.tar.gz, file: source/util_api/ansc/AnscPlatform/ansc_protection.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -533,12 +533,13 @@
return;
}

AnscAcquireSpinLock(&sim_event->StateSpinLock);
if ( !sim_event->bSignalled )
{
AnscReleaseSpinLock(&sim_event->StateSpinLock);
return;
}

AnscAcquireSpinLock(&sim_event->StateSpinLock);
sim_event->bSignalled = FALSE;
AnscReleaseSpinLock(&sim_event->StateSpinLock);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/util_api/slap/components/SlapObjEntity/slap_oeo_management.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/util_api/slap/components/SlapObjEntity/slap_oeo_management.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 1378 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/util_api/slap/components/SlapObjEntity/slap_oeo_management.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -1314,14 +1314,14 @@
PSLAP_BSS_INTERFACE pSlapBssIf = (PSLAP_BSS_INTERFACE )pMyObject->hSlapBssIf;
PSLAP_OBJ_RECORD_OBJECT pSlapObjRecord = (PSLAP_OBJ_RECORD_OBJECT)hObjRecord;

AnscAcquireLock (&pMyObject->PooledOroSListLock);
if ( AnscSListQueryDepth(&pMyObject->PooledOroSList) >= pSlapBssIf->GetDefPoolSize(pSlapBssIf->hOwnerContext) )
{
pSlapObjRecord->Remove((ANSC_HANDLE)pSlapObjRecord);

AnscReleaseLock (&pMyObject->PooledOroSListLock);
return ANSC_STATUS_SUCCESS;
}

AnscAcquireLock (&pMyObject->PooledOroSListLock);
AnscSListPushEntry(&pMyObject->PooledOroSList, &pSlapObjRecord->Linkage);
AnscReleaseLock (&pMyObject->PooledOroSListLock);

Expand Down
Loading