diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 2a051d710..64e3142f7 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -1153,6 +1153,8 @@ bool RsGenExchange::subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId, if(mNetService != NULL) mNetService->subscribeStatusChanged(grpId,subscribe) ; + else + std::cerr << "(EE) No mNetService in RsGenExchange for service 0x" << std::hex << mServType << std::dec << std::endl; return true; } diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 3f7229ac9..142fb69f7 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -1355,6 +1355,8 @@ int RsServer::StartupRetroShare() true,false); // synchronise group automatic // don't sync messages at all. + mGxsCircles->setNetworkExchangeService(gxscircles_ns) ; + /**** Posted GXS service ****/ diff --git a/libretroshare/src/services/p3gxscircles.cc b/libretroshare/src/services/p3gxscircles.cc index f169f9c9a..c0996805a 100644 --- a/libretroshare/src/services/p3gxscircles.cc +++ b/libretroshare/src/services/p3gxscircles.cc @@ -37,6 +37,7 @@ /**** * #define DEBUG_CIRCLES 1 ****/ +#define DEBUG_CIRCLES 1 RsGxsCircles *rsGxsCircles = NULL; @@ -183,10 +184,10 @@ void p3GxsCircles::notifyChanges(std::vector &changes) std::vector::iterator it; for(it = changes.begin(); it != changes.end(); ++it) { - RsGxsGroupChange *groupChange = dynamic_cast(*it); - RsGxsMsgChange *msgChange = dynamic_cast(*it); - if (msgChange && !msgChange->metaChange()) - { + RsGxsGroupChange *groupChange = dynamic_cast(*it); + RsGxsMsgChange *msgChange = dynamic_cast(*it); + if (msgChange && !msgChange->metaChange()) + { #ifdef DEBUG_CIRCLES std::cerr << "p3GxsCircles::notifyChanges() Found Message Change Notification"; std::cerr << std::endl; @@ -201,9 +202,9 @@ void p3GxsCircles::notifyChanges(std::vector &changes) std::cerr << std::endl; #endif } - } + } - /* add groups to ExternalIdList (Might get Personal Circles here until NetChecks in place) */ + /* add groups to ExternalIdList (Might get Personal Circles here until NetChecks in place) */ if (groupChange && !groupChange->metaChange()) { #ifdef DEBUG_CIRCLES @@ -216,20 +217,20 @@ void p3GxsCircles::notifyChanges(std::vector &changes) for(git = groupList.begin(); git != groupList.end(); ++git) { #ifdef DEBUG_CIRCLES - std::cerr << "p3GxsCircles::notifyChanges() Incoming Group: " << *git; - std::cerr << std::endl; + std::cerr << "p3GxsCircles::notifyChanges() Incoming Group: " << *git << ". Forcing cache load." << std::endl; #endif // for new circles we need to add them to the list. - // we don't know the type of this circle here - // original behavior was to add all ids to the external ids list - addCircleIdToList(RsGxsCircleId(*git), 0); + // we don't know the type of this circle here + // original behavior was to add all ids to the external ids list + addCircleIdToList(RsGxsCircleId(*git), 0); + cache_request_load(RsGxsCircleId(*git)) ; - // reset the cached circle data for this id - { - RsStackMutex stack(mCircleMtx); /********** STACK LOCKED MTX ******/ - mCircleCache.erase(RsGxsCircleId(*git)); - } + // reset the cached circle data for this id + { + RsStackMutex stack(mCircleMtx); /********** STACK LOCKED MTX ******/ + mCircleCache.erase(RsGxsCircleId(*git)); + } } } } @@ -1265,8 +1266,9 @@ bool p3GxsCircles::checkCircleCacheForAutoSubscribe(RsGxsCircleCache &cache) uint32_t token, token2; - RsGenExchange::subscribeToGroup(token, RsGxsGroupId(cache.mCircleId.toStdString()), true); - RsGenExchange::setGroupStatusFlags(token2, RsGxsGroupId(cache.mCircleId.toStdString()), 0, GXS_SERV::GXS_GRP_STATUS_UNPROCESSED); + RsGenExchange::subscribeToGroup(token, RsGxsGroupId(cache.mCircleId), true); + RsGenExchange::setGroupStatusFlags(token2, RsGxsGroupId(cache.mCircleId), 0, GXS_SERV::GXS_GRP_STATUS_UNPROCESSED); + cache.mGroupStatus ^= GXS_SERV::GXS_GRP_STATUS_UNPROCESSED; return true; }