Updating development with upstream changes #2

Closed
muellerr wants to merge 38 commits from mueller/master into development
Showing only changes of commit e35c2cd604 - Show all commits

View File

@ -34,13 +34,9 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(sid_t sid,
PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) { PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) {
HasLocalDataPoolIF* hkOwner = objectManager->get<HasLocalDataPoolIF>( HasLocalDataPoolIF* hkOwner = objectManager->get<HasLocalDataPoolIF>(
sid.objectId); sid.objectId);
if(hkOwner == nullptr) { if(hkOwner != nullptr) {
// Configuration error.
sif::error << "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
<< "invalid!" << std::endl;
return;
}
hkManager = hkOwner->getHkManagerHandle(); hkManager = hkOwner->getHkManagerHandle();
}
this->sid = sid; this->sid = sid;
mutex = MutexFactory::instance()->createMutex(); mutex = MutexFactory::instance()->createMutex();
@ -50,8 +46,11 @@ LocalPoolDataSetBase::~LocalPoolDataSetBase() {
} }
ReturnValue_t LocalPoolDataSetBase::lockDataPool(uint32_t timeoutMs) { ReturnValue_t LocalPoolDataSetBase::lockDataPool(uint32_t timeoutMs) {
if(hkManager != nullptr) {
MutexIF* mutex = hkManager->getMutexHandle(); MutexIF* mutex = hkManager->getMutexHandle();
return mutex->lockMutex(MutexIF::TimeoutType::WAITING, timeoutMs); return mutex->lockMutex(MutexIF::TimeoutType::WAITING, timeoutMs);
}
return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t LocalPoolDataSetBase::serializeWithValidityBuffer(uint8_t **buffer, ReturnValue_t LocalPoolDataSetBase::serializeWithValidityBuffer(uint8_t **buffer,
@ -127,8 +126,11 @@ ReturnValue_t LocalPoolDataSetBase::deSerializeWithValidityBuffer(
} }
ReturnValue_t LocalPoolDataSetBase::unlockDataPool() { ReturnValue_t LocalPoolDataSetBase::unlockDataPool() {
if(hkManager != nullptr) {
MutexIF* mutex = hkManager->getMutexHandle(); MutexIF* mutex = hkManager->getMutexHandle();
return mutex->unlockMutex(); return mutex->unlockMutex();
}
return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t LocalPoolDataSetBase::serializeLocalPoolIds(uint8_t** buffer, ReturnValue_t LocalPoolDataSetBase::serializeLocalPoolIds(uint8_t** buffer,