mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-18 02:50:47 -04:00
Avoid crash when subscribeToChannel is fed with invaled channel id
Fix a couple compiler warning too
This commit is contained in:
parent
ce3e2a2c9d
commit
3b8f6997bb
5 changed files with 42 additions and 37 deletions
|
@ -1493,6 +1493,11 @@ int RsDataService::retrieveGxsGrpMetaData(RsGxsGrpMetaTemporaryMap& grp)
|
|||
std::cerr << "RsDataService::retrieveGxsGrpMetaData() " << mDbName << ", Requests: " << requestedGroups << ", Results: " << resultCount << ", Time: " << timer.duration() << std::endl;
|
||||
#endif
|
||||
|
||||
/* Remove not found entries as stated in the documentation */
|
||||
for(auto i = grp.begin(); i != grp.end();)
|
||||
if(!i->second) i = grp.erase(i);
|
||||
else ++i;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1009,18 +1009,14 @@ bool RsGxsDataAccess::getGroupSummary(GroupMetaReq* req)
|
|||
}
|
||||
|
||||
bool RsGxsDataAccess::getGroupList(GroupIdReq* req)
|
||||
{
|
||||
getGroupList(req->mGroupIds, req->Options, req->mGroupIdResult);
|
||||
|
||||
return true;
|
||||
}
|
||||
{ return getGroupList(req->mGroupIds, req->Options, req->mGroupIdResult); }
|
||||
|
||||
bool RsGxsDataAccess::getGroupList(const std::list<RsGxsGroupId>& grpIdsIn, const RsTokReqOptions& opts, std::list<RsGxsGroupId>& grpIdsOut)
|
||||
{
|
||||
RsGxsGrpMetaTemporaryMap grpMeta;
|
||||
|
||||
for(auto lit = grpIdsIn.begin(); lit != grpIdsIn.end(); ++lit)
|
||||
grpMeta[*lit] = NULL;
|
||||
grpMeta[*lit] = nullptr;
|
||||
|
||||
mDataStore->retrieveGxsGrpMetaData(grpMeta);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue