mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed double feed publication
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7920 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e6d92bf44e
commit
a7e0fd8345
2
TODO.txt
2
TODO.txt
@ -47,7 +47,7 @@ List of fixes/improvements before 0.6
|
||||
|
||||
News feed
|
||||
[X] remove the Ghost news feed items
|
||||
[ ] remove the double feed publication
|
||||
[X] remove the double feed publication
|
||||
|
||||
libretroshare
|
||||
[ ] fix the data race in pqissl
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "rsgixs.h"
|
||||
#include "rsgxsutil.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#define PUB_GRP_MASK 0x000f
|
||||
#define RESTR_GRP_MASK 0x00f0
|
||||
@ -2526,7 +2527,12 @@ void RsGenExchange::processRecvdMessages()
|
||||
{
|
||||
meta->mMsgStatus = GXS_SERV::GXS_MSG_STATUS_UNPROCESSED | GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||
msgs.insert(std::make_pair(msg, meta));
|
||||
msgIds[msg->grpId].push_back(msg->msgId);
|
||||
|
||||
std::vector<RsGxsMessageId> &msgv = msgIds[msg->grpId];
|
||||
if (std::find(msgv.begin(), msgv.end(), msg->msgId) == msgv.end())
|
||||
{
|
||||
msgv.push_back(msg->msgId);
|
||||
}
|
||||
|
||||
NxsMsgPendingVect::iterator validated_entry = std::find(mMsgPendingValidate.begin(), mMsgPendingValidate.end(),
|
||||
getMsgIdPair(*msg));
|
||||
@ -2900,7 +2906,13 @@ void RsGenExchange::removeDeleteExistingMessages( RsGeneralDataService::MsgStore
|
||||
RsGxsMessageId::std_vector::iterator it2 = std::find(notifyIds.begin(),
|
||||
notifyIds.end(), cit2->second->mMsgId);
|
||||
if(it2 != notifyIds.end())
|
||||
{
|
||||
notifyIds.erase(it2);
|
||||
if (notifyIds.empty())
|
||||
{
|
||||
msgIdsNotify.erase(cit2->second->mGroupId);
|
||||
}
|
||||
}
|
||||
#ifdef GEN_EXCH_DEBUG
|
||||
std::cerr << " discarding " << cit2->second->mMsgId << std::endl;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user