From 1fe366400789bbab3134e22f19c281ded893cbcb Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 30 Dec 2020 20:16:25 +0100 Subject: [PATCH] fixed bug causing GXS sync to fail and crash --- libretroshare/src/gxs/rsgxsdataaccess.cc | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libretroshare/src/gxs/rsgxsdataaccess.cc b/libretroshare/src/gxs/rsgxsdataaccess.cc index 49d33417d..c169b9999 100644 --- a/libretroshare/src/gxs/rsgxsdataaccess.cc +++ b/libretroshare/src/gxs/rsgxsdataaccess.cc @@ -339,7 +339,7 @@ bool RsGxsDataAccess::cancelRequest(const uint32_t& token) { RsStackMutex stack(mDataMutex); /****** LOCKED *****/ - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if (!req) { return false; @@ -377,7 +377,7 @@ bool RsGxsDataAccess::getGroupSummary(const uint32_t& token, std::list& { RS_STACK_MUTEX(mDataMutex); - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if(req == nullptr) { @@ -442,7 +442,7 @@ bool RsGxsDataAccess::getMsgData(const uint32_t& token, NxsMsgDataResult& msgDat RsStackMutex stack(mDataMutex); - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if(req == nullptr) { @@ -468,12 +468,12 @@ bool RsGxsDataAccess::getMsgData(const uint32_t& token, NxsMsgDataResult& msgDat return true; } -bool RsGxsDataAccess::getMsgRelatedData(const uint32_t &token, NxsMsgRelatedDataResult &msgData) +bool RsGxsDataAccess::getMsgRelatedData(const uint32_t& token, NxsMsgRelatedDataResult& msgData) { RsStackMutex stack(mDataMutex); - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if(req == nullptr) { @@ -506,7 +506,7 @@ bool RsGxsDataAccess::getMsgSummary(const uint32_t& token, GxsMsgMetaResult& msg RsStackMutex stack(mDataMutex); - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if(req == nullptr) { @@ -533,7 +533,7 @@ bool RsGxsDataAccess::getMsgRelatedSummary(const uint32_t &token, MsgRelatedMeta { RsStackMutex stack(mDataMutex); - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if(req == nullptr) { @@ -564,7 +564,7 @@ bool RsGxsDataAccess::getMsgRelatedList(const uint32_t &token, MsgRelatedIdResul { RsStackMutex stack(mDataMutex); - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if(req == nullptr) { @@ -594,7 +594,7 @@ bool RsGxsDataAccess::getMsgIdList(const uint32_t& token, GxsMsgIdResult& msgIds { RsStackMutex stack(mDataMutex); - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if(req == nullptr) { @@ -621,7 +621,7 @@ bool RsGxsDataAccess::getGroupList(const uint32_t& token, std::listOptions.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_DATA) { GxsMsgResult msgResult; - mDataStore->retrieveNxsMsgs(filteredOutMsgIds, msgResult, false, true); + mDataStore->retrieveNxsMsgs(filteredOutMsgIds, msgResult, true, true); req->mMsgDataResult[grpMsgIdPair] = msgResult[grpId]; } } @@ -1637,7 +1637,7 @@ bool RsGxsDataAccess::checkRequestStatus( uint32_t token, GxsRequestStatus& stat { RS_STACK_MUTEX(mDataMutex); - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); #ifdef DATA_DEBUG RsDbg() << "CheckRequestStatus: token=" << token ; @@ -1733,7 +1733,7 @@ void RsGxsDataAccess::tokenList(std::list& tokens) bool RsGxsDataAccess::locked_updateRequestStatus( uint32_t token, RsTokenService::GxsRequestStatus status ) { - GxsRequest* req = locked_retrieveCompetedRequest(token); + GxsRequest* req = locked_retrieveCompletedRequest(token); if(req) req->status = status; else return false;