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/ccsp/components/common/DataModel/dml/components/DslhWmpDatabase/dslh_wmpdo_states.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/ccsp/components/common/DataModel/dml/components/DslhWmpDatabase/dslh_wmpdo_states.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 520 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/ccsp/components/common/DataModel/dml/components/DslhWmpDatabase/dslh_wmpdo_states.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -475,12 +475,14 @@

pMyObject->ResetObjVarArray(hThisObject);

AnscAcquireLock(&pMyObject->MpaWriteLock);
if ( pMyObject->LockedEntity )
{
AnscFreeMemory(pMyObject->LockedEntity);

pMyObject->LockedEntity = NULL;
}
AnscReleaseLock(&pMyObject->MpaWriteLock);

if ( pMyObject->pRootObjName)
{
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/cosa/package/bmc2/components/Bmc2ComTerminal/bmc2_comto_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/cosa/package/bmc2/components/Bmc2ComTerminal/bmc2_comto_management.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 359 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/cosa/package/bmc2/components/Bmc2ComTerminal/bmc2_comto_management.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -110,8 +110,10 @@
)
{
PBMC2_COM_TERMINAL_OBJECT pMyObject = (PBMC2_COM_TERMINAL_OBJECT )hThisObject;

return AnscSListQueryDepth(&pMyObject->ComdoSList);
AnscAcquireLock(&pMyObject->ComdoSListLock);
ULONG domainCount = AnscSListQueryDepth(&pMyObject->ComdoSList);
AnscReleaseLock(&pMyObject->ComdoSListLock);
return domainCount;
}


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/cosa/package/system/components/SysRecycleBin/sys_rbo_access.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/SysRecycleBin/sys_rbo_access.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 372 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/SysRecycleBin/sys_rbo_access.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -249,12 +249,13 @@
PSYS_REPOSITORY_FOLDER_OBJECT pRepFolder = (PSYS_REPOSITORY_FOLDER_OBJECT)NULL;
PSINGLE_LINK_ENTRY pSLinkEntry = NULL;

AnscAcquireLock(&pMyObject->FolderQueueLock);
if ( ulIndex >= AnscQueueQueryDepth(&pMyObject->FolderQueue) )
{
AnscReleaseLock(&pMyObject->FolderQueueLock);
return (ANSC_HANDLE)NULL;
}

AnscAcquireLock(&pMyObject->FolderQueueLock);
pSLinkEntry = AnscQueueSearchEntryByIndex(&pMyObject->FolderQueue, ulIndex);
AnscReleaseLock(&pMyObject->FolderQueueLock);

Expand Down Expand Up @@ -355,12 +356,13 @@
PSYS_REPOSITORY_RECORD_OBJECT pRepRecord = (PSYS_REPOSITORY_RECORD_OBJECT)NULL;
PSINGLE_LINK_ENTRY pSLinkEntry = NULL;

AnscAcquireLock(&pMyObject->RecordQueueLock);
if ( ulIndex >= AnscQueueQueryDepth(&pMyObject->RecordQueue) )
{
AnscReleaseLock(&pMyObject->RecordQueueLock);
return (ANSC_HANDLE)NULL;
}

AnscAcquireLock(&pMyObject->RecordQueueLock);
pSLinkEntry = AnscQueueSearchEntryByIndex(&pMyObject->RecordQueue, ulIndex);
AnscReleaseLock(&pMyObject->RecordQueueLock);

Expand Down
5 changes: 4 additions & 1 deletion source/util_api/ansc/AnscCoVer3/ansc_cover3_base.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/AnscCoVer3/ansc_cover3_base.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/AnscCoVer3/ansc_cover3_base.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 359 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/AnscCoVer3/ansc_cover3_base.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -194,7 +194,10 @@
pMyObject->bShuttingDown = TRUE;

/* wait for all tasks to quit */
while ( pMyObject->EngineTaskCount > 0 )
AnscAcquireLock(&pMyObject->EtoAccessLock);
ULONG pEngineTaskCount_local = pMyObject->EngineTaskCount;
AnscReleaseLock(&pMyObject->EtoAccessLock);
while ( pEngineTaskCount_local > 0 )
{
AnscSleep(100);
}
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/AnscDaemonEngineUdp/ansc_deuo_process.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/AnscDaemonEngineUdp/ansc_deuo_process.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 279 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/AnscDaemonEngineUdp/ansc_deuo_process.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -113,7 +113,9 @@
UNREFERENCED_PARAMETER(hThisObject);
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PANSC_DAEMON_SOCKET_UDP_OBJECT pSocket = (PANSC_DAEMON_SOCKET_UDP_OBJECT)hSocket;
AnscAcquireLock(&pSocket->OpLock);
PANSC_DSUO_PACKET_OBJECT pPacket = (PANSC_DSUO_PACKET_OBJECT )pSocket->hPacket;
AnscReleaseLock(&pSocket->OpLock);

pSocket->RecvBytesCount += pPacket->RecvPacketSize;
pSocket->LastRecvAt = AnscGetTickInSeconds();
Expand Down
7 changes: 5 additions & 2 deletions source/util_api/ansc/AnscDaemonEngineUdp/ansc_deuo_recv.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/AnscDaemonEngineUdp/ansc_deuo_recv.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/AnscDaemonEngineUdp/ansc_deuo_recv.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 297 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/AnscDaemonEngineUdp/ansc_deuo_recv.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -72,7 +72,7 @@


#include "ansc_deuo_global.h"

#include <stdbool.h>

/**********************************************************************

Expand Down Expand Up @@ -261,7 +261,10 @@
);
}

if ( pSocket->bRecvEnabled )
AnscAcquireLock(&pSocket->OpLock);
bool bRecvEnabled_local = pSocket->bRecvEnabled;
AnscReleaseLock(&pSocket->OpLock);
if ( bRecvEnabled_local )
{
pSocket->SetPacket
(
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/AnscDaemonServerTcp/ansc_dsto_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/AnscDaemonServerTcp/ansc_dsto_management.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 752 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/AnscDaemonServerTcp/ansc_dsto_management.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -558,7 +558,9 @@
}
else
{
AnscAcquireLock(&pMyObject->EngineQueueLock);
pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->EngineQueue);
AnscReleaseLock(&pMyObject->EngineQueueLock);
pEngine = ACCESS_ANSC_DAEMON_ENGINE_TCP_OBJECT(pSLinkEntry);
}
}
Expand Down
4 changes: 4 additions & 0 deletions source/util_api/ansc/AnscDaemonServerUdp/ansc_dsuo_worker.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/AnscDaemonServerUdp/ansc_dsuo_worker.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/AnscDaemonServerUdp/ansc_dsuo_worker.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/1, 150 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/AnscDaemonServerUdp/ansc_dsuo_worker.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -109,8 +109,12 @@
PANSC_DAEMON_SERVER_UDP_OBJECT pMyObject = (PANSC_DAEMON_SERVER_UDP_OBJECT)pSocket->hDaemonServer;
PANSC_DAEMON_ENGINE_UDP_OBJECT pEngine = (PANSC_DAEMON_ENGINE_UDP_OBJECT)pSocket->hDaemonEngine;
PANSC_DSUO_WORKER_OBJECT pWorker = (PANSC_DSUO_WORKER_OBJECT )pMyObject->hWorker;

AnscAcquireLock(&pSocket->OpLock);
PANSC_DSUO_PACKET_OBJECT pPacket = (PANSC_DSUO_PACKET_OBJECT )pSocket->hPacket;
AnscReleaseLock(&pSocket->OpLock);


if ( !pPacket )
{
return ANSC_STATUS_UNAPPLICABLE;
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/AnscDaemonSocketUdp/ansc_dkuo_process.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/AnscDaemonSocketUdp/ansc_dkuo_process.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 292 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/AnscDaemonSocketUdp/ansc_dkuo_process.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -120,7 +120,9 @@
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PANSC_DAEMON_SOCKET_UDP_OBJECT pMyObject = (PANSC_DAEMON_SOCKET_UDP_OBJECT)hThisObject;
PANSC_DAEMON_SERVER_UDP_OBJECT pServer = (PANSC_DAEMON_SERVER_UDP_OBJECT)pMyObject->hDaemonServer;
AnscAcquireLock(&pMyObject->OpLock);
PANSC_DSUO_PACKET_OBJECT pPacket = (PANSC_DSUO_PACKET_OBJECT )pMyObject->hPacket;
AnscReleaseLock(&pMyObject->OpLock);
ULONG ulPmode = ANSC_DSUOWO_PMODE_DISCARD;
BOOL bFreePacket = TRUE;

Expand Down
10 changes: 7 additions & 3 deletions source/util_api/ansc/AnscDaemonSocketUdp/ansc_dkuo_states.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/AnscDaemonSocketUdp/ansc_dkuo_states.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/AnscDaemonSocketUdp/ansc_dkuo_states.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 663 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/AnscDaemonSocketUdp/ansc_dkuo_states.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -513,8 +513,12 @@
)
{
PANSC_DAEMON_SOCKET_UDP_OBJECT pMyObject = (PANSC_DAEMON_SOCKET_UDP_OBJECT)hThisObject;
ANSC_HANDLE hPacket;

return pMyObject->hPacket;
AnscAcquireLock(&pMyObject->OpLock);
hPacket = pMyObject->hPacket;
AnscReleaseLock(&pMyObject->OpLock);
return hPacket;
}


Expand Down Expand Up @@ -649,14 +653,14 @@
/* CID: 137150 Data race condition */
AnscAcquireLock(&pMyObject->OpLock);
pMyObject->hPacket = (ANSC_HANDLE)NULL;
pMyObject->bSendEnabled = TRUE;
pMyObject->bRecvEnabled = TRUE;
AnscReleaseLock(&pMyObject->OpLock);
pMyObject->RecvBytesCount = 0;
pMyObject->SendBytesCount = 0;
pMyObject->LastRecvAt = 0;
pMyObject->LastSendAt = 0;
pMyObject->bClosed = TRUE;
pMyObject->bRecvEnabled = TRUE;
pMyObject->bSendEnabled = TRUE;

return ANSC_STATUS_SUCCESS;
}
4 changes: 3 additions & 1 deletion source/util_api/ansc/AnscPlatform/ansc_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,19 @@ AnscFreeTaskRecord
PANSC_TASK_RECORD pTaskRecord
)
{
AnscAcquireSpinLock(&pTaskRecord->AccessSpinLock);
if( pTaskRecord->RefCount == 1 )
{
pTaskRecord->RefCount = 0;
pTaskRecord->Handle = 0;
AnscReleaseSpinLock(&pTaskRecord->AccessSpinLock);
AnscFreeMemory(pTaskRecord);
}
else {
AnscTrace("WARNING - AnscFreeTaskRecord, task record %lu-%p reference count is %lu!\n",
pTaskRecord->Handle,pTaskRecord, pTaskRecord->RefCount);
AnscReleaseSpinLock(&pTaskRecord->AccessSpinLock);
}

}


Expand Down
10 changes: 5 additions & 5 deletions source/util_api/asn.1/components/al_pki/alcert_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,10 @@ ALCERTGetCACount
{
return 0;
}

return AnscSListQueryDepth(&pThisObject->sCAList);
AnscAcquireLock(&pThisObject->CALock);
ULONG caCount = AnscSListQueryDepth(&pThisObject->sCAList);
AnscReleaseLock(&pThisObject->CALock);
return caCount;
}

ULONG
Expand Down Expand Up @@ -803,13 +805,11 @@ ALCERTRemoveAllCAs
}
}

AnscReleaseLock(&pThisObject->CALock);


/*
* reset the SList;
*/
AnscSListInitializeHeader(&pThisObject->sCAList);
AnscReleaseLock(&pThisObject->CALock);

return ANSC_STATUS_SUCCESS;
}
Expand Down
2 changes: 1 addition & 1 deletion source/util_api/ccsp_msg_bus/ccsp_base_api_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ void CcspBaseIf_deadlock_detection_log_save
parameterAttributeStruct_t * parameterAttribute = 0; //setParameterAttributes
char * str = NULL; //AddTblRow / DeleteTblRow
unsigned long size = 0;
unsigned long index = deadlock_detection_log_index;
unsigned int i = 0;
char timestr[128] = {0};
time_t t1 = GetCurrentTime();
Expand All @@ -528,6 +527,7 @@ void CcspBaseIf_deadlock_detection_log_save

pthread_mutex_lock(&(info->info_mutex));

unsigned long index = deadlock_detection_log_index;
if ( info->messageType )
{
size = info->size;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ HttpMboSaveNonFileData
}
}

AnscAcquireLock(&pMyObject->BdoQueueLock);
pSLinkEntry = AnscQueueGetLastEntry(&pMyObject->BdoQueue);

if ( pSLinkEntry )
Expand All @@ -476,6 +477,7 @@ HttpMboSaveNonFileData
pSavedBdo = AnscAllocateBdo(HTTP_MBO_MP_PART_BDO_SIZE, 0, 0);
if ( !pSavedBdo )
{
AnscReleaseLock(&pMyObject->BdoQueueLock);
return ANSC_STATUS_RESOURCES;
}
AnscQueuePushEntry(&pMyObject->BdoQueue, &pSavedBdo->Linkage);
Expand All @@ -493,10 +495,12 @@ HttpMboSaveNonFileData
pSavedBdo = AnscAllocateBdo(ulNewBdoSize, 0, 0);
if ( !pSavedBdo )
{
AnscReleaseLock(&pMyObject->BdoQueueLock);
return ANSC_STATUS_RESOURCES;
}
AnscQueuePushEntry(&pMyObject->BdoQueue, &pSavedBdo->Linkage);
}
AnscReleaseLock(&pMyObject->BdoQueueLock);

#ifdef _DEBUG /* kang debug */
AnscTrace("Non file form data saved %lu bytes.\n", ulDataLen);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ HttpPsoAddNewBmoReq
{
pBmoReq->SetHfpIf ((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)pHfpIf );
pBmoReq->SetTmhIf ((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)pTmhClientIf );
AnscAcquireLock(&pMyObject->BmoReqSListLock);
pBmoReq->SetTransactionId((ANSC_HANDLE)pBmoReq, AnscSListQueryDepth(&pMyObject->BmoReqSList));
AnscReleaseLock(&pMyObject->BmoReqSListLock);
}

AnscAcquireLock (&pMyObject->BmoReqSListLock);
Expand Down Expand Up @@ -522,7 +524,9 @@ HttpPsoAddNewBmoRep
{
pBmoRep->SetHfpIf ((ANSC_HANDLE)pBmoRep, (ANSC_HANDLE)pHfpIf );
pBmoRep->SetTmhIf ((ANSC_HANDLE)pBmoRep, (ANSC_HANDLE)pTmhServerIf );
AnscAcquireLock(&pMyObject->BmoRepSListLock);
pBmoRep->SetTransactionId((ANSC_HANDLE)pBmoRep, AnscSListQueryDepth(&pMyObject->BmoRepSList));
AnscReleaseLock(&pMyObject->BmoRepSListLock);
}

AnscAcquireLock (&pMyObject->BmoRepSListLock);
Expand Down
Loading