mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-21 04:44:25 -04:00
fixed auto-subscribed of circles when some IDs are unknown
This commit is contained in:
parent
47dd44292a
commit
ba1a1b2a61
1 changed files with 9 additions and 6 deletions
|
@ -37,6 +37,7 @@
|
||||||
/****
|
/****
|
||||||
* #define DEBUG_CIRCLES 1
|
* #define DEBUG_CIRCLES 1
|
||||||
****/
|
****/
|
||||||
|
#define DEBUG_CIRCLES 1
|
||||||
|
|
||||||
RsGxsCircles *rsGxsCircles = NULL;
|
RsGxsCircles *rsGxsCircles = NULL;
|
||||||
|
|
||||||
|
@ -121,7 +122,6 @@ p3GxsCircles::p3GxsCircles(RsGeneralDataService *gds, RsNetworkExchangeService *
|
||||||
// Dummy Circles.
|
// Dummy Circles.
|
||||||
// RsTickEvent::schedule_in(CIRCLE_EVENT_DUMMYSTART, CIRCLE_DUMMY_STARTPERIOD);
|
// RsTickEvent::schedule_in(CIRCLE_EVENT_DUMMYSTART, CIRCLE_DUMMY_STARTPERIOD);
|
||||||
mDummyIdToken = 0;
|
mDummyIdToken = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1114,12 +1114,12 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
|
||||||
isUnprocessedPeers = false;
|
isUnprocessedPeers = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we can check for self inclusion in the circle right away, since own ids are always loaded.
|
||||||
|
// that allows to subscribe/unsubscribe uncomplete circles
|
||||||
|
checkCircleCacheForAutoSubscribe(cache);
|
||||||
|
|
||||||
if (isComplete)
|
if (isComplete)
|
||||||
{
|
{
|
||||||
checkCircleCacheForAutoSubscribe(cache);
|
|
||||||
|
|
||||||
/* move straight into the cache */
|
/* move straight into the cache */
|
||||||
mCircleCache.store(id, cache);
|
mCircleCache.store(id, cache);
|
||||||
mCircleCache.resize();
|
mCircleCache.resize();
|
||||||
|
@ -1266,8 +1266,11 @@ bool p3GxsCircles::cache_reloadids(const RsGxsCircleId &circleId)
|
||||||
|
|
||||||
|
|
||||||
/* We need to AutoSubscribe if the Circle is relevent to us */
|
/* We need to AutoSubscribe if the Circle is relevent to us */
|
||||||
|
|
||||||
bool p3GxsCircles::checkCircleCacheForAutoSubscribe(RsGxsCircleCache &cache)
|
bool p3GxsCircles::checkCircleCacheForAutoSubscribe(RsGxsCircleCache &cache)
|
||||||
{
|
{
|
||||||
|
#warning we should also check for items in mLoadingCache in this method.
|
||||||
|
|
||||||
#ifdef DEBUG_CIRCLES
|
#ifdef DEBUG_CIRCLES
|
||||||
std::cerr << "p3GxsCircles::checkCircleCacheForAutoSubscribe() : "<< cache.mCircleId << std::endl;
|
std::cerr << "p3GxsCircles::checkCircleCacheForAutoSubscribe() : "<< cache.mCircleId << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue