fixed removal of messages in unsubscribed groups

This commit is contained in:
csoler 2016-06-17 20:46:58 -04:00
parent 886d896151
commit 4df4bb638f

View File

@ -89,11 +89,14 @@ bool RsGxsMessageCleanUp::clean()
remove &= !(meta->mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP); remove &= !(meta->mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP);
// if not subscribed remove messages (can optimise this really) // if not subscribed remove messages (can optimise this really)
remove = remove || (grpMeta->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED); remove = remove || (grpMeta->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED);
remove = remove || !(grpMeta->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED);
if( remove ) if( remove )
{ {
req[grpId].push_back(meta->mMsgId); req[grpId].push_back(meta->mMsgId);
std::cerr << "Scheduling msg id " << meta->mMsgId << " in grp " << grpId << " for removal." << std::endl;
} }
delete meta; delete meta;