diff --git a/datapool/PoolDataSetBase.cpp b/datapool/PoolDataSetBase.cpp index 88470152..e7572b27 100644 --- a/datapool/PoolDataSetBase.cpp +++ b/datapool/PoolDataSetBase.cpp @@ -93,6 +93,7 @@ ReturnValue_t PoolDataSetBase::readVariable(uint16_t count) { mutexTimeoutForSingleVars); } else { + /* The readWithoutLock function is protected, so we use the attorney here */ result = ReadCommitIFAttorney::readWithoutLock(registeredVariables[count]); } @@ -125,6 +126,7 @@ void PoolDataSetBase::handleAlreadyReadDatasetCommit( mutexTimeoutForSingleVars); } else { + /* The commitWithoutLock function is protected, so we use the attorney here */ ReadCommitIFAttorney::commitWithoutLock(registeredVariables[count]); } } @@ -145,7 +147,8 @@ ReturnValue_t PoolDataSetBase::handleUnreadDatasetCommit( mutexTimeoutForSingleVars); } else { - result = registeredVariables[count]->commitWithoutLock(); + /* The commitWithoutLock function is protected, so we use the attorney here */ + ReadCommitIFAttorney::commitWithoutLock(registeredVariables[count]); } } else if (registeredVariables[count]->getDataPoolId() diff --git a/datapool/ReadCommitIF.h b/datapool/ReadCommitIF.h index d8bc5a66..3ad2b3c0 100644 --- a/datapool/ReadCommitIF.h +++ b/datapool/ReadCommitIF.h @@ -17,7 +17,7 @@ public: virtual ReturnValue_t commit(MutexIF::TimeoutType timeoutType, uint32_t timeoutMs) = 0; -public: +protected: /* Optional and protected because this is interesting for classes grouping members with commit and read semantics where the lock is only necessary once. */