mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 13:24:15 -05: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
|
News feed
|
||||||
[X] remove the Ghost news feed items
|
[X] remove the Ghost news feed items
|
||||||
[ ] remove the double feed publication
|
[X] remove the double feed publication
|
||||||
|
|
||||||
libretroshare
|
libretroshare
|
||||||
[ ] fix the data race in pqissl
|
[ ] fix the data race in pqissl
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "rsgixs.h"
|
#include "rsgixs.h"
|
||||||
#include "rsgxsutil.h"
|
#include "rsgxsutil.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#define PUB_GRP_MASK 0x000f
|
#define PUB_GRP_MASK 0x000f
|
||||||
#define RESTR_GRP_MASK 0x00f0
|
#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;
|
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));
|
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(),
|
NxsMsgPendingVect::iterator validated_entry = std::find(mMsgPendingValidate.begin(), mMsgPendingValidate.end(),
|
||||||
getMsgIdPair(*msg));
|
getMsgIdPair(*msg));
|
||||||
@ -2900,7 +2906,13 @@ void RsGenExchange::removeDeleteExistingMessages( RsGeneralDataService::MsgStore
|
|||||||
RsGxsMessageId::std_vector::iterator it2 = std::find(notifyIds.begin(),
|
RsGxsMessageId::std_vector::iterator it2 = std::find(notifyIds.begin(),
|
||||||
notifyIds.end(), cit2->second->mMsgId);
|
notifyIds.end(), cit2->second->mMsgId);
|
||||||
if(it2 != notifyIds.end())
|
if(it2 != notifyIds.end())
|
||||||
|
{
|
||||||
notifyIds.erase(it2);
|
notifyIds.erase(it2);
|
||||||
|
if (notifyIds.empty())
|
||||||
|
{
|
||||||
|
msgIdsNotify.erase(cit2->second->mGroupId);
|
||||||
|
}
|
||||||
|
}
|
||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
std::cerr << " discarding " << cit2->second->mMsgId << std::endl;
|
std::cerr << " discarding " << cit2->second->mMsgId << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user