added mOriginator to CircleCache entry and auto-ask for unknown GXS ids to the friend who supplied the circle group

This commit is contained in:
csoler 2016-04-14 23:47:42 -04:00
parent ba1a1b2a61
commit 048192ee9c
4 changed files with 9 additions and 13 deletions

View file

@ -2840,8 +2840,8 @@ void RsGenExchange::processRecvdGroups()
// now check if group already existss
if(std::find(existingGrpIds.begin(), existingGrpIds.end(), grp->grpId) == existingGrpIds.end())
{
if(meta->mCircleType == GXS_CIRCLE_TYPE_YOUREYESONLY)
meta->mOriginator = grp->PeerId();
//if(meta->mCircleType == GXS_CIRCLE_TYPE_YOUREYESONLY)
meta->mOriginator = grp->PeerId();
meta->mSubscribeFlags = GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED;

View file

@ -37,7 +37,6 @@
/****
* #define DEBUG_CIRCLES 1
****/
#define DEBUG_CIRCLES 1
RsGxsCircles *rsGxsCircles = NULL;
@ -978,6 +977,7 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
RsGxsCircleCache &cache = it->second;
cache.loadBaseCircle(group);
cache.mOriginator = item->meta.mOriginator ;
delete item;
@ -1043,6 +1043,8 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
#endif
std::list<PeerId> peers;
peers.push_back(cache.mOriginator) ;
mIdentities->requestKey(*pit, peers);
/* store in to_process queue. */

View file

@ -156,6 +156,8 @@ class RsGxsCircleCache
std::set<RsGxsId> mAllowedAnonPeers;
std::map<RsPgpId, std::set<RsGxsId> > mAllowedSignedPeers;
RsPeerId mOriginator ; // peer who sent the data, in case we need to ask for ids
};