diff --git a/frameworks/libs/distributeddb/common/include/relational/prepared_stmt.h b/frameworks/libs/distributeddb/common/include/relational/prepared_stmt.h index 5307b08faacfacbb71a5635e616a6cc1a8d8bc3b..38eb2fe7cc12c5491176027a1ef729c90d8f3a08 100644 --- a/frameworks/libs/distributeddb/common/include/relational/prepared_stmt.h +++ b/frameworks/libs/distributeddb/common/include/relational/prepared_stmt.h @@ -38,7 +38,7 @@ public: bool IsValid() const; - int CalcLength() const; + uint32_t CalcLength() const; int Serialize(Parcel &parcel) const; int DeSerialize(Parcel &parcel); diff --git a/frameworks/libs/distributeddb/common/include/user_change_monitor.h b/frameworks/libs/distributeddb/common/include/user_change_monitor.h index 6f55d9e18ebb412a039ff9fe9158e726693b4b9d..df6d18c9a2f8fcee4d8241247fdc91991b7a6d44 100644 --- a/frameworks/libs/distributeddb/common/include/user_change_monitor.h +++ b/frameworks/libs/distributeddb/common/include/user_change_monitor.h @@ -20,7 +20,6 @@ #include "macro_utils.h" #include "notification_chain.h" -#include "platform_specific.h" #include "runtime_context.h" namespace DistributedDB { diff --git a/frameworks/libs/distributeddb/common/src/auto_launch.cpp b/frameworks/libs/distributeddb/common/src/auto_launch.cpp index 23471b2d4d8cbef7e1f77c0deb8ee0298b7ac9f6..388840b1256d0bff9da7ad144804d23d2e368b0c 100644 --- a/frameworks/libs/distributeddb/common/src/auto_launch.cpp +++ b/frameworks/libs/distributeddb/common/src/auto_launch.cpp @@ -47,12 +47,11 @@ void AutoLaunch::SetCommunicatorAggregator(ICommunicatorAggregator *aggregator) LOGI("[AutoLaunch] SetCommunicatorAggregator communicatorAggregator_ is not nullptr"); errCode = communicatorAggregator_->RegOnConnectCallback(nullptr, nullptr); if (errCode != E_OK) { - LOGW("[AutoLaunch] communicatorAggregator_->RegOnConnectCallback(nullptr, nullptr), errCode:%d", errCode); + LOGW("[AutoLaunch] RegOnConnectCallback set nullptr failed, errCode:%d", errCode); } errCode = communicatorAggregator_->RegCommunicatorLackCallback(nullptr, nullptr); if (errCode != E_OK) { - LOGW("[AutoLaunch] communicatorAggregator_->RegCommunicatorLackCallback(nullptr, nullptr), errCode:%d", - errCode); + LOGW("[AutoLaunch] RegCommunicatorLackCallback set nullptr failed, errCode:%d", errCode); } } communicatorAggregator_ = aggregator; @@ -63,13 +62,13 @@ void AutoLaunch::SetCommunicatorAggregator(ICommunicatorAggregator *aggregator) errCode = aggregator->RegOnConnectCallback(std::bind(&AutoLaunch::OnlineCallBack, this, std::placeholders::_1, std::placeholders::_2), nullptr); if (errCode != E_OK) { - LOGW("[AutoLaunch] aggregator->RegOnConnectCallback errCode:%d", errCode); + LOGW("[AutoLaunch] RegOnConnectCallback errCode:%d", errCode); } errCode = aggregator->RegCommunicatorLackCallback( std::bind(&AutoLaunch::ReceiveUnknownIdentifierCallBack, this, std::placeholders::_1, std::placeholders::_2), nullptr); if (errCode != E_OK) { - LOGW("[AutoLaunch] aggregator->RegCommunicatorLackCallback errCode:%d", errCode); + LOGW("[AutoLaunch] RegCommunicatorLackCallback errCode:%d", errCode); } } @@ -606,7 +605,7 @@ void AutoLaunch::GetConnInDoOpenMap(std::mapScheduleTask([&sema, &iter, &items, this] { int ret = OpenOneConnection(iter.second); - LOGI("[AutoLaunch] GetConnInDoOpenMap GetOneConnection errCode:%d\n", ret); + LOGI("[AutoLaunch] GetConnInDoOpenMap GetOneConnection errCode:%d", ret); if (iter.second.conn == nullptr) { sema.SendSemaphore(); LOGI("[AutoLaunch] GetConnInDoOpenMap in open thread finish SendSemaphore"); @@ -661,7 +660,7 @@ void AutoLaunch::ReceiveUnknownIdentifierCallBackTask(const std::string &identif autoLaunchItem = autoLaunchItemMap_[identifier][userId]; } int errCode = OpenOneConnection(autoLaunchItem); - LOGI("[AutoLaunch] ReceiveUnknownIdentifierCallBack GetOneConnection errCode:%d\n", errCode); + LOGI("[AutoLaunch] ReceiveUnknownIdentifierCallBack GetOneConnection errCode:%d", errCode); if (autoLaunchItem.conn == nullptr) { std::lock_guard autoLock(dataLock_); autoLaunchItemMap_[identifier][userId].state = AutoLaunchItemState::IDLE; diff --git a/frameworks/libs/distributeddb/common/src/relational/prepared_stmt.cpp b/frameworks/libs/distributeddb/common/src/relational/prepared_stmt.cpp index 1735cf1ca18d543ce6a7b9d2b2a095c0d47d1f31..03db2eb0f285673b6c975cbe3aa55f93404a3767 100644 --- a/frameworks/libs/distributeddb/common/src/relational/prepared_stmt.cpp +++ b/frameworks/libs/distributeddb/common/src/relational/prepared_stmt.cpp @@ -56,7 +56,7 @@ bool PreparedStmt::IsValid() const return opCode_ == ExecutorOperation::QUERY && !sql_.empty() && bindArgs_.size() <= DBConstant::MAX_SQL_ARGS_COUNT; } -int PreparedStmt::CalcLength() const +uint32_t PreparedStmt::CalcLength() const { uint32_t length = Parcel::GetIntLen() + // current version Parcel::GetIntLen() + // opcode_ @@ -65,7 +65,7 @@ int PreparedStmt::CalcLength() const for (const auto &bindArg : bindArgs_) { length += Parcel::GetStringLen(bindArg); // bindArgs_ } - return static_cast(Parcel::GetEightByteAlign(length)); + return Parcel::GetEightByteAlign(length); } // Before call this func. You should check if the object is valid. diff --git a/frameworks/libs/distributeddb/common/src/relational/relational_row_data_set.cpp b/frameworks/libs/distributeddb/common/src/relational/relational_row_data_set.cpp index 912f6cc76c25f5677f25bd45d0829787e8f5e368..e602066006e94fc46ab81d3456c4bf6e042e9b2d 100644 --- a/frameworks/libs/distributeddb/common/src/relational/relational_row_data_set.cpp +++ b/frameworks/libs/distributeddb/common/src/relational/relational_row_data_set.cpp @@ -149,6 +149,9 @@ int RelationalRowDataSet::Insert(RelationalRowData *rowData) if (rowData == nullptr) { return -E_INVALID_ARGS; } + if ((serialLength_ + static_cast(rowData->CalcLength())) > static_cast(INT32_MAX)) { + return -E_INVALID_ARGS; + } data_.push_back(rowData); serialLength_ += rowData->CalcLength(); return E_OK; diff --git a/frameworks/libs/distributeddb/communicator/src/communicator_aggregator.cpp b/frameworks/libs/distributeddb/communicator/src/communicator_aggregator.cpp index 1ec0fa24a763b3d3b85b9e9d64a4abfc120ac9b7..c3b3df30e9000313d9f0f210cd8dad6e65a2b904 100644 --- a/frameworks/libs/distributeddb/communicator/src/communicator_aggregator.cpp +++ b/frameworks/libs/distributeddb/communicator/src/communicator_aggregator.cpp @@ -14,17 +14,14 @@ */ #include "communicator_aggregator.h" -#include -#include -#include -#include + #include "hash.h" -#include "log_print.h" -#include "db_common.h" #include "communicator.h" +#include "communicator_linker.h" +#include "db_common.h" #include "endian_convert.h" +#include "log_print.h" #include "protocol_proto.h" -#include "communicator_linker.h" namespace DistributedDB { namespace { diff --git a/frameworks/libs/distributeddb/communicator/src/protocol_proto.cpp b/frameworks/libs/distributeddb/communicator/src/protocol_proto.cpp index 8d27be2af6cc7e1559b78a609f3b3fb660f14d26..ed79435483bfbe96752a0bb02d25ee8308a6dfed 100644 --- a/frameworks/libs/distributeddb/communicator/src/protocol_proto.cpp +++ b/frameworks/libs/distributeddb/communicator/src/protocol_proto.cpp @@ -208,14 +208,19 @@ SerialBuffer *ProtocolProto::BuildLabelExchange(uint64_t inDistinctValue, uint64 { // Size of inLabels won't be too large. // The upper layer code(inside this communicator module) guarantee that size of each Label equals COMM_LABEL_LENGTH - uint32_t payloadLen = LABEL_VER_LEN + DISTINCT_VALUE_LEN + SEQUENCE_ID_LEN + COMM_LABEL_COUNT_LEN + + uint64_t payloadLen = LABEL_VER_LEN + DISTINCT_VALUE_LEN + SEQUENCE_ID_LEN + COMM_LABEL_COUNT_LEN + inLabels.size() * COMM_LABEL_LENGTH; + if (payloadLen > INT32_MAX) { + outErrorNo = -E_INVALID_ARGS; + return nullptr; + } SerialBuffer *buffer = new (std::nothrow) SerialBuffer(); if (buffer == nullptr) { outErrorNo = -E_OUT_OF_MEMORY; return nullptr; } - int errCode = buffer->AllocBufferByPayloadLength(payloadLen, GetCommLayerFrameHeaderLength()); + int errCode = buffer->AllocBufferByPayloadLength(static_cast(payloadLen), + GetCommLayerFrameHeaderLength()); if (errCode != E_OK) { LOGE("[Proto][BuildLabel] Alloc Fail, errCode=%d.", errCode); outErrorNo = errCode; diff --git a/frameworks/libs/distributeddb/communicator/src/serial_buffer.cpp b/frameworks/libs/distributeddb/communicator/src/serial_buffer.cpp index 4fbcd89af9f8c34fb130c228cbfab78a5d9bc3f8..ae75a154a460acf8101e34ff8fee865944ee8871 100644 --- a/frameworks/libs/distributeddb/communicator/src/serial_buffer.cpp +++ b/frameworks/libs/distributeddb/communicator/src/serial_buffer.cpp @@ -44,7 +44,8 @@ uint32_t SerialBuffer::GetExtendHeadLength() const // In case buffer be directly send out, so padding is needed int SerialBuffer::AllocBufferByPayloadLength(uint32_t inPayloadLen, uint32_t inHeaderLen) { - if (oringinalBytes_ != nullptr || bytes_ != nullptr || externalBytes_ != nullptr) { + if (oringinalBytes_ != nullptr || bytes_ != nullptr || externalBytes_ != nullptr || + BYTE_8_ALIGN(static_cast(payloadLen_) + static_cast(headerLen_)) > INT32_MAX) { return -E_NOT_PERMIT; } diff --git a/frameworks/libs/distributeddb/interfaces/include/kv_store_observer.h b/frameworks/libs/distributeddb/interfaces/include/kv_store_observer.h index ea74c0c4b85439e4a79162274330aa3d8d441ec5..ab2c9a295ddd440a805d1e3eecd71108cce0bc4f 100644 --- a/frameworks/libs/distributeddb/interfaces/include/kv_store_observer.h +++ b/frameworks/libs/distributeddb/interfaces/include/kv_store_observer.h @@ -23,7 +23,7 @@ class KvStoreObserver { public: virtual ~KvStoreObserver() {} - // Databa change callback + // Data change callback virtual void OnChange(const KvStoreChangedData &data) = 0; }; } // namespace DistributedDB diff --git a/frameworks/libs/distributeddb/interfaces/include/relational/store_observer.h b/frameworks/libs/distributeddb/interfaces/include/relational/store_observer.h index 6072bbc694668ce585cee25cb21605691865c33e..ea753a3ed89041ea0f3fb66859b0ecdea4a485e5 100644 --- a/frameworks/libs/distributeddb/interfaces/include/relational/store_observer.h +++ b/frameworks/libs/distributeddb/interfaces/include/relational/store_observer.h @@ -23,7 +23,7 @@ class StoreObserver { public: virtual ~StoreObserver() {} - // Databa change callback + // Data change callback virtual void OnChange(const StoreChangedData &data) = 0; }; } // namespace DistributedDB diff --git a/frameworks/libs/distributeddb/storage/src/sync_able_engine.cpp b/frameworks/libs/distributeddb/storage/src/sync_able_engine.cpp index 282e3e68865a71613b9f2996d4593ebf8b73229f..fc34669a02d7e82d28ad9c624d9191bb725e5e84 100644 --- a/frameworks/libs/distributeddb/storage/src/sync_able_engine.cpp +++ b/frameworks/libs/distributeddb/storage/src/sync_able_engine.cpp @@ -178,7 +178,7 @@ void SyncAbleEngine::UserChangeHandle() isNeedChange = (isNeedActive != isSyncNeedActive_) ? true : false; // non_active to active or active to non_active if (isNeedChange) { - StopSyncerWithNoLock(); // will drop userChangeListerner; + StopSyncerWithNoLock(); // will drop userChangeListener isSyncModuleActiveCheck_ = true; isSyncNeedActive_ = isNeedActive; StartSyncerWithNoLock(true, isNeedActive); diff --git a/frameworks/libs/distributeddb/storage/src/sync_able_kvdb.cpp b/frameworks/libs/distributeddb/storage/src/sync_able_kvdb.cpp index fc55252d7d80b678dc59110554ae2a04d6fbc461..21edf7885b886d20e895714dee538e2eb1206bea 100644 --- a/frameworks/libs/distributeddb/storage/src/sync_able_kvdb.cpp +++ b/frameworks/libs/distributeddb/storage/src/sync_able_kvdb.cpp @@ -232,7 +232,7 @@ void SyncAbleKvDB::UserChangeHandle() isNeedChange = (isNeedActive != isSyncNeedActive_) ? true : false; // non_active to active or active to non_active if (isNeedChange) { - StopSyncerWithNoLock(); // will drop userChangeListerner; + StopSyncerWithNoLock(); // will drop userChangeListener isSyncModuleActiveCheck_ = true; isSyncNeedActive_ = isNeedActive; StartSyncerWithNoLock(true, isNeedActive); diff --git a/frameworks/libs/distributeddb/syncer/src/ability_sync.cpp b/frameworks/libs/distributeddb/syncer/src/ability_sync.cpp index 38359d6117732c46e6394005210ca0e5ffb9f891..b02926d7fa834facde07d308671e467654eab915 100644 --- a/frameworks/libs/distributeddb/syncer/src/ability_sync.cpp +++ b/frameworks/libs/distributeddb/syncer/src/ability_sync.cpp @@ -617,7 +617,6 @@ int AbilitySync::Serialization(uint8_t *buffer, uint32_t length, const Message * case TYPE_REQUEST: return RequestPacketSerialization(buffer, length, inMsg); case TYPE_RESPONSE: - return AckPacketSerialization(buffer, length, inMsg); case TYPE_NOTIFY: return AckPacketSerialization(buffer, length, inMsg); default: @@ -635,7 +634,6 @@ int AbilitySync::DeSerialization(const uint8_t *buffer, uint32_t length, Message case TYPE_REQUEST: return RequestPacketDeSerialization(buffer, length, inMsg); case TYPE_RESPONSE: - return AckPacketDeSerialization(buffer, length, inMsg); case TYPE_NOTIFY: return AckPacketDeSerialization(buffer, length, inMsg); default: diff --git a/frameworks/libs/distributeddb/syncer/src/db_ability.cpp b/frameworks/libs/distributeddb/syncer/src/db_ability.cpp index 54631a3ccd31875232e5acc2fe97fb17379d9390..9204f52d4e23bd2be666e61119049e4d460c4a19 100644 --- a/frameworks/libs/distributeddb/syncer/src/db_ability.cpp +++ b/frameworks/libs/distributeddb/syncer/src/db_ability.cpp @@ -66,11 +66,7 @@ int DbAbility::Serialize(Parcel &parcel, const DbAbility &curAbility) uint64_t value = static_cast(abilityBuff[pos]) << innerBuffOffset; dstBuf[buffOffset] = dstBuf[buffOffset] | value; } - int errCode = parcel.WriteVector(dstBuf); - if (errCode != E_OK) { - return errCode; - } - return E_OK; + return parcel.WriteVector(dstBuf); } int DbAbility::DeSerialize(Parcel &parcel, DbAbility &curAbility) diff --git a/frameworks/libs/distributeddb/syncer/src/generic_syncer.cpp b/frameworks/libs/distributeddb/syncer/src/generic_syncer.cpp index 80ea17ad298ee249a65149ca318cb484b1bce70d..f4657850967dc46e19860b273269b1a09356d59d 100644 --- a/frameworks/libs/distributeddb/syncer/src/generic_syncer.cpp +++ b/frameworks/libs/distributeddb/syncer/src/generic_syncer.cpp @@ -149,7 +149,7 @@ int GenericSyncer::Close(bool isClosedOperation) timeHelper_ = nullptr; metadata_ = nullptr; } - LOGW("[Syncer] Syncer[%s] don't need to close, because it has no been init", label_.c_str()); + LOGW("[Syncer] Syncer[%s] don't need to close, because it has not been init", label_.c_str()); return -E_NOT_INIT; } initialized_ = false; @@ -360,6 +360,10 @@ int GenericSyncer::InitMetaData(ISyncInterface *syncInterface) } metadata_ = std::make_shared(); + if (metadata_ == nullptr) { + LOGE("[Syncer] metadata make shared failed"); + return -E_OUT_OF_MEMORY; + } int errCode = metadata_->Initialize(syncInterface); if (errCode != E_OK) { LOGE("[Syncer] metadata Initializeate failed! err %d.", errCode); @@ -376,6 +380,9 @@ int GenericSyncer::InitTimeHelper(ISyncInterface *syncInterface) } timeHelper_ = std::make_shared(); + if (timeHelper_ == nullptr) { + return -E_OUT_OF_MEMORY; + } int errCode = timeHelper_->Initialize(syncInterface, metadata_); if (errCode != E_OK) { LOGE("[Syncer] TimeHelper init failed! err:%d.", errCode); diff --git a/frameworks/libs/distributeddb/syncer/src/single_ver_data_packet.cpp b/frameworks/libs/distributeddb/syncer/src/single_ver_data_packet.cpp index 135398cd3d08c69403491beda23a3ae2844b4112..64f85ba255171aa04c2a7f9feabbd4fad740ed10 100644 --- a/frameworks/libs/distributeddb/syncer/src/single_ver_data_packet.cpp +++ b/frameworks/libs/distributeddb/syncer/src/single_ver_data_packet.cpp @@ -152,6 +152,9 @@ uint32_t DataRequestPacket::CalculateLen(uint32_t messageId) const { uint64_t totalLen = GenericSingleVerKvEntry::CalculateLens( IsCompressData() ? std::vector {} : data_, version_); // for data + if (totalLen == 0) { + return 0; + } totalLen += Parcel::GetUInt64Len(); // endWaterMark totalLen += Parcel::GetUInt64Len(); // localWaterMark totalLen += Parcel::GetUInt64Len(); // peerWaterMark diff --git a/frameworks/libs/distributeddb/syncer/src/single_ver_sync_state_machine.cpp b/frameworks/libs/distributeddb/syncer/src/single_ver_sync_state_machine.cpp index fc1c9b8617f3a7c1fbb159473af3eb82271e765d..5295d2222e0570717e46234dfbe7fd1d10725c7e 100644 --- a/frameworks/libs/distributeddb/syncer/src/single_ver_sync_state_machine.cpp +++ b/frameworks/libs/distributeddb/syncer/src/single_ver_sync_state_machine.cpp @@ -129,6 +129,12 @@ int SingleVerSyncStateMachine::Initialize(ISyncTaskContext *context, ISyncInterf timeSync_ = std::make_unique(); dataSync_ = std::make_shared(); abilitySync_ = std::make_unique(); + if ((timeSync_ == nullptr) || (dataSync_ == nullptr) || (abilitySync_ == nullptr)) { + timeSync_ = nullptr; + dataSync_ = nullptr; + abilitySync_ = nullptr; + return -E_OUT_OF_MEMORY; + } errCode = timeSync_->Initialize(communicator, metaData, syncInterface, context->GetDeviceId()); if (errCode != E_OK) { diff --git a/frameworks/libs/distributeddb/syncer/src/subscribe_manager.cpp b/frameworks/libs/distributeddb/syncer/src/subscribe_manager.cpp index 40991b6ec8807f343b69a290ad8698028c188995..f0facc99739be521fef358a6589ad2432946009b 100644 --- a/frameworks/libs/distributeddb/syncer/src/subscribe_manager.cpp +++ b/frameworks/libs/distributeddb/syncer/src/subscribe_manager.cpp @@ -77,7 +77,7 @@ int SubscribeManager::ActiveLocalSubscribeQuery(const std::string &device, const } if (unFinishedLocalAutoSubMap_.find(device) != unFinishedLocalAutoSubMap_.end() && unFinishedLocalAutoSubMap_[device].find(queryId) != unFinishedLocalAutoSubMap_[device].end()) { - unFinishedLocalAutoSubMap_[device].erase(queryId); + unFinishedLocalAutoSubMap_[device].erase(queryId); } return errCode; } @@ -147,12 +147,12 @@ void SubscribeManager::RemoveLocalSubscribeQuery(const std::string &device, cons RemoveSubscribeQuery(device, queryId, localSubscribeMap_, localSubscribeTotalMap_); if (unFinishedLocalAutoSubMap_.find(device) != unFinishedLocalAutoSubMap_.end() && unFinishedLocalAutoSubMap_[device].find(queryId) != unFinishedLocalAutoSubMap_[device].end()) { - unFinishedLocalAutoSubMap_[device].erase(queryId); - LOGI("[SubscribeManager] dev=%s,queryId=%s delete from UnFinishedMap", STR_MASK(device), STR_MASK(queryId)); - if (unFinishedLocalAutoSubMap_[device].size() == 0) { - LOGI("[SubscribeManager] dev=%s delete from unFinish map", STR_MASK(device)); - unFinishedLocalAutoSubMap_.erase(device); - } + unFinishedLocalAutoSubMap_[device].erase(queryId); + LOGI("[SubscribeManager] dev=%s,queryId=%s delete from UnFinishedMap", STR_MASK(device), STR_MASK(queryId)); + if (unFinishedLocalAutoSubMap_[device].size() == 0) { + LOGI("[SubscribeManager] dev=%s delete from unFinish map", STR_MASK(device)); + unFinishedLocalAutoSubMap_.erase(device); + } } } diff --git a/frameworks/libs/distributeddb/syncer/src/sync_operation.h b/frameworks/libs/distributeddb/syncer/src/sync_operation.h index bb4f02c9399b4678ab707357d5cc7f07166b991d..c10013d2aa5c45e7cb4791135132409d1117a8dc 100644 --- a/frameworks/libs/distributeddb/syncer/src/sync_operation.h +++ b/frameworks/libs/distributeddb/syncer/src/sync_operation.h @@ -138,9 +138,6 @@ private: // called by destruction void Finalize(); - // Transfer sync mode from interface to inner - void TransferQuerySyncMode(); - // The device list const std::vector devices_; diff --git a/frameworks/libs/distributeddb/syncer/src/syncer_factory.h b/frameworks/libs/distributeddb/syncer/src/syncer_factory.h index 20e1c45e2bd086d1750515fe912fb00e85c785e5..e235251d869c0f20f7368ccc5028873810a69e79 100644 --- a/frameworks/libs/distributeddb/syncer/src/syncer_factory.h +++ b/frameworks/libs/distributeddb/syncer/src/syncer_factory.h @@ -26,6 +26,7 @@ public: // Product a ISyncer for the given type // type can be : IKvDBSyncInterface::SYNC_SVD // IKvDBSyncInterface::SYNC_MVD + // IKvDBSyncInterface::SYNC_RELATION static std::shared_ptr GetSyncer(int type); }; } // namespace DistributedDB diff --git a/frameworks/libs/distributeddb/syncer/src/value_slice_sync.cpp b/frameworks/libs/distributeddb/syncer/src/value_slice_sync.cpp index d9490cecb645a59968f1310f2209ad9f7beca9b0..62a822b4b7f621f3697b1d8636971b41cd40f098 100644 --- a/frameworks/libs/distributeddb/syncer/src/value_slice_sync.cpp +++ b/frameworks/libs/distributeddb/syncer/src/value_slice_sync.cpp @@ -292,9 +292,6 @@ int ValueSliceSync::AckRecvCallback(const MultiVerSyncTaskContext *context, cons } LOGD("ValueSliceSync::AckRecvCallback PutValueSlice finished, src=%s{private}, errCode = %d", context->GetDeviceId().c_str(), errCode); - if (errCode != E_OK) { - return errCode; - } return errCode; }