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
2 changes: 1 addition & 1 deletion PackageManager/PackageManagerImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,11 +738,11 @@ namespace Plugin {
void PackageManagerImplementation::downloader(int n)
{
InitializeState();
std::unique_lock<std::mutex> lock(mMutex);
while(!done) {
auto di = getNext();
if (di == nullptr) {
LOGTRACE("Waiting ... ");
std::unique_lock<std::mutex> lock(mMutex);
cv.wait(lock);
} else {
HttpClient::Status status = HttpClient::Status::Success;
Expand Down
2 changes: 1 addition & 1 deletion PackageManager/PackageManagerImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace Plugin {
Exchange::RuntimeConfig runtimeConfig;
string gatewayMetadataPath;
string unpackedPath;
FailReason failReason;
FailReason failReason = Exchange::IPackageInstaller::FailReason::NONE;
std::list<Exchange::IPackageHandler::AdditionalLock> additionalLocks;
};

Expand Down
13 changes: 8 additions & 5 deletions RustAdapter/SocketServer.cpp
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 LICENSE file the

Check failure on line 2 in RustAdapter/SocketServer.cpp

View workflow job for this annotation

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

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'RustAdapter/SocketServer.cpp' (Match: rdkcentral/rdkservices/1, 458 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: RustAdapter/SocketServer.cpp)
* following copyright and licenses apply:
*
* Copyright 2022 RDK Management
Expand Down Expand Up @@ -306,18 +306,21 @@

int SocketServer::ReadExact(uint8_t* p, int len)
{
if (!p || len <= 0)
return -1;

if (m_serverSocket <= 0 || m_clientSocket <= 0)
return -1;

int remaining = len;
size_t remaining = (size_t)len;

while (remaining > 0)
{
int num = (int)read(m_clientSocket, p, remaining);
ssize_t num = read(m_clientSocket, p, remaining);

if (num <= 0)
{
LOGERR("SocketServer::ReadExact failed: num=%d", num);
LOGERR("SocketServer::ReadExact failed: num=%zd", num);

if (num == 0)
return CLIENT_DISCONNECT;
Expand All @@ -327,13 +330,13 @@
else
{
p += num;
remaining -= num;
remaining -= (size_t)num;
}
}

if (remaining != 0)
{
LOGERR("SocketServer::ReadExact: failed: remaining=%d", remaining);
LOGERR("SocketServer::ReadExact: failed: remaining=%zu", remaining);
return -1;
}

Expand Down
Loading