Fixed relatedMsgData bug (PARENT | LATEST), same issue as ALL_VERSION opt flags, was using origMsgId used for filtering (filtering worked as bugged request was actually requesting all msgs instead).

Added test for (PARENT | LATEST)
All tests passed

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5835 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-11-17 18:45:14 +00:00
parent d591d795bd
commit ae5cbecaba
4 changed files with 204 additions and 20 deletions

View file

@ -1221,7 +1221,7 @@ bool RsGxsDataAccess::getMsgRelatedInfo(MsgRelatedInfoReq *req)
{
// add as latest. (overwriting if necessary)
origMsgTs[meta->mOrigMsgId] = std::make_pair(meta->mMsgId, meta->mPublishTs);
metaMap.insert(std::make_pair(meta->mOrigMsgId, meta));
metaMap.insert(std::make_pair(meta->mMsgId, meta));
}
}
@ -1275,7 +1275,7 @@ bool RsGxsDataAccess::getMsgRelatedInfo(MsgRelatedInfoReq *req)
filteredOutMsgIds[grpId] = outMsgIds;
filterMsgList(filteredOutMsgIds, opts, filterMap);
if(!outMsgIds.empty())
if(!filteredOutMsgIds[grpId].empty())
{
if(req->Options.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_IDS)
{