diff --git a/libretroshare/src/services/p3gxscircles.cc b/libretroshare/src/services/p3gxscircles.cc index 97b19151e..7f3d1bf5e 100644 --- a/libretroshare/src/services/p3gxscircles.cc +++ b/libretroshare/src/services/p3gxscircles.cc @@ -559,22 +559,25 @@ void p3GxsCircles::notifyChanges(std::vector &changes) for (auto msgIdIt(mit->second.begin()), end(mit->second.end()); msgIdIt != end; ++msgIdIt) { RsGxsCircleMsg msg; - getCircleRequest(RsGxsGroupId(circle_id),*msgIdIt,msg); + if(getCircleRequest(RsGxsGroupId(circle_id),*msgIdIt,msg)) + { + auto ev = std::make_shared(); + ev->mCircleId = circle_id; + ev->mGxsId = msg.mMeta.mAuthorId; - auto ev = std::make_shared(); - ev->mCircleId = circle_id; - ev->mGxsId = msg.mMeta.mAuthorId; - - if (msg.stuff == "SUBSCRIPTION_REQUEST_UNSUBSCRIBE") - { - ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_MEMBERSHIP_LEAVE; - rsEvents->postEvent(ev); - } - else if(msg.stuff == "SUBSCRIPTION_REQUEST_SUBSCRIBE") - { - ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_MEMBERSHIP_REQUEST; - rsEvents->postEvent(ev); - } + if (msg.stuff == "SUBSCRIPTION_REQUEST_UNSUBSCRIBE") + { + ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_MEMBERSHIP_LEAVE; + rsEvents->postEvent(ev); + } + else if(msg.stuff == "SUBSCRIPTION_REQUEST_SUBSCRIBE") + { + ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_MEMBERSHIP_REQUEST; + rsEvents->postEvent(ev); + } + } + else + RsErr()<< __PRETTY_FUNCTION__<<" Cannot request CircleMsg " << *msgIdIt << ". Db not ready?" << std::endl; } mCircleCache.erase(circle_id); diff --git a/retroshare-gui/src/gui/People/PeopleDialog.cpp b/retroshare-gui/src/gui/People/PeopleDialog.cpp index c1ebd6329..5d6b9ee84 100644 --- a/retroshare-gui/src/gui/People/PeopleDialog.cpp +++ b/retroshare-gui/src/gui/People/PeopleDialog.cpp @@ -271,21 +271,23 @@ void PeopleDialog::insertCircles(uint32_t token) std::list gSummaryList; std::list::iterator gsIt; - if (!rsGxsCircles->getGroupSummary(token,gSummaryList)) { + if (!rsGxsCircles->getGroupSummary(token,gSummaryList)) + { std::cerr << "PeopleDialog::insertExtCircles() Error getting GroupSummary"; std::cerr << std::endl; return; - }//if (!rsGxsCircles->getGroupSummary(token,gSummaryList)) + } for(gsIt = gSummaryList.begin(); gsIt != gSummaryList.end(); ++gsIt) { RsGroupMetaData gsItem = (*gsIt); RsGxsCircleDetails details ; - if(!rsGxsCircles->getCircleDetails(RsGxsCircleId(gsItem.mGroupId), details)){ + if(!rsGxsCircles->getCircleDetails(RsGxsCircleId(gsItem.mGroupId), details)) + { std::cerr << "(EE) Cannot get details for circle id " << gsItem.mGroupId << ". Circle item is not created!" << std::endl; continue ; - }//if(!rsGxsCircles->getCircleDetails(RsGxsCircleId(git->mGroupId), details)) + } if (details.mCircleType != RsGxsCircleType::EXTERNAL) {