mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 16:45:11 -04:00
Fixed the FriendFeed backup of messages:
* switched to one universal PendingCache list. * added mHistoricalCaches variable to p3distrib - to indicate when old caches have been loaded. * added calls to p3GroupDistrib::HistoricalCachesDone() in rsinit.cc * added "historical" parameter to lots of p3distrib functions. * updated child classes to only add FeedItems if (historical == false). * Switched Validate / Duplicate Msg checks to speed up historical data load. * corrected rsrandom function for OSX. * bugfix to rsloginhandler function. (compile error). git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4008 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8c35ecdc67
commit
0dcef10ec2
11 changed files with 198 additions and 112 deletions
|
@ -292,14 +292,14 @@ const uint32_t DOWNLOAD_PERIOD = 7 * 24 * 3600;
|
|||
*
|
||||
*/
|
||||
|
||||
bool p3Blogs::locked_eventDuplicateMsg(GroupInfo *grp, RsDistribMsg *msg, std::string id)
|
||||
bool p3Blogs::locked_eventDuplicateMsg(GroupInfo *grp, RsDistribMsg *msg, std::string id, bool historical)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#include "pqi/pqinotify.h"
|
||||
|
||||
bool p3Blogs::locked_eventNewMsg(GroupInfo *grp, RsDistribMsg *msg, std::string id)
|
||||
bool p3Blogs::locked_eventNewMsg(GroupInfo *grp, RsDistribMsg *msg, std::string id, bool historical)
|
||||
{
|
||||
std::string grpId = msg->grpId;
|
||||
std::string msgId = msg->msgId;
|
||||
|
@ -311,7 +311,10 @@ bool p3Blogs::locked_eventNewMsg(GroupInfo *grp, RsDistribMsg *msg, std::string
|
|||
std::cerr << " peerId: " << id;
|
||||
std::cerr << std::endl;
|
||||
|
||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_BLOG_MSG, grpId, msgId, nullId);
|
||||
if (!historical)
|
||||
{
|
||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_BLOG_MSG, grpId, msgId, nullId);
|
||||
}
|
||||
|
||||
/* request the files
|
||||
* NB: This could result in duplicates.
|
||||
|
@ -319,13 +322,13 @@ bool p3Blogs::locked_eventNewMsg(GroupInfo *grp, RsDistribMsg *msg, std::string
|
|||
*
|
||||
* this is exactly what DuplicateMsg does.
|
||||
* */
|
||||
return locked_eventDuplicateMsg(grp, msg, id);
|
||||
return locked_eventDuplicateMsg(grp, msg, id, historical);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void p3Blogs::locked_notifyGroupChanged(GroupInfo &grp, uint32_t flags)
|
||||
void p3Blogs::locked_notifyGroupChanged(GroupInfo &grp, uint32_t flags, bool historical)
|
||||
{
|
||||
std::string grpId = grp.grpId;
|
||||
std::string msgId;
|
||||
|
@ -341,12 +344,18 @@ void p3Blogs::locked_notifyGroupChanged(GroupInfo &grp, uint32_t flags)
|
|||
case GRP_NEW_UPDATE:
|
||||
std::cerr << "p3Blogs::locked_notifyGroupChanged() NEW UPDATE";
|
||||
std::cerr << std::endl;
|
||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_BLOG_NEW, grpId, msgId, nullId);
|
||||
if (!historical)
|
||||
{
|
||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_BLOG_NEW, grpId, msgId, nullId);
|
||||
}
|
||||
break;
|
||||
case GRP_UPDATE:
|
||||
std::cerr << "p3Blogs::locked_notifyGroupChanged() UPDATE";
|
||||
std::cerr << std::endl;
|
||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_BLOG_UPDATE, grpId, msgId, nullId);
|
||||
if (!historical)
|
||||
{
|
||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_BLOG_UPDATE, grpId, msgId, nullId);
|
||||
}
|
||||
break;
|
||||
case GRP_LOAD_KEY:
|
||||
std::cerr << "p3Blogs::locked_notifyGroupChanged() LOAD_KEY";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue