diff --git a/libretroshare/src/retroshare/rsgxsifacehelper.h b/libretroshare/src/retroshare/rsgxsifacehelper.h index 7be714103..8d12893f4 100644 --- a/libretroshare/src/retroshare/rsgxsifacehelper.h +++ b/libretroshare/src/retroshare/rsgxsifacehelper.h @@ -46,6 +46,7 @@ enum class TokenRequestType: uint8_t MSG_RELATED_INFO = 0x03, GROUP_STATISTICS = 0x04, SERVICE_STATISTICS = 0x05, + NO_KILL_TYPE = 0x06, }; class RsGxsIfaceHelper @@ -244,15 +245,14 @@ public: } /// @see RsTokenService::requestGroupInfo - bool requestGroupInfo( uint32_t& token, const RsTokReqOptions& opts, - const std::list &groupIds ) + bool requestGroupInfo( uint32_t& token, const RsTokReqOptions& opts, const std::list &groupIds, bool high_priority_request = false ) { - cancelActiveRequestTokens(TokenRequestType::GROUP_INFO); + cancelActiveRequestTokens(TokenRequestType::GROUP_INFO); if( mTokenService.requestGroupInfo(token, 0, opts, groupIds)) { RS_STACK_MUTEX(mMtx); - mActiveTokens[token]=TokenRequestType::GROUP_INFO; + mActiveTokens[token]=high_priority_request? (TokenRequestType::NO_KILL_TYPE) : (TokenRequestType::GROUP_INFO); locked_dumpTokens(); return true; } @@ -261,14 +261,14 @@ public: } /// @see RsTokenService::requestGroupInfo - bool requestGroupInfo(uint32_t& token, const RsTokReqOptions& opts) + bool requestGroupInfo(uint32_t& token, const RsTokReqOptions& opts, bool high_priority_request = false) { - cancelActiveRequestTokens(TokenRequestType::GROUP_INFO); + cancelActiveRequestTokens(TokenRequestType::GROUP_INFO); if( mTokenService.requestGroupInfo(token, 0, opts)) { RS_STACK_MUTEX(mMtx); - mActiveTokens[token]=TokenRequestType::GROUP_INFO; + mActiveTokens[token]=high_priority_request? (TokenRequestType::NO_KILL_TYPE) : (TokenRequestType::GROUP_INFO); locked_dumpTokens(); return true; } diff --git a/libretroshare/src/services/p3gxsforums.cc b/libretroshare/src/services/p3gxsforums.cc index 442878bba..c7f3fddcf 100644 --- a/libretroshare/src/services/p3gxsforums.cc +++ b/libretroshare/src/services/p3gxsforums.cc @@ -679,7 +679,7 @@ bool p3GxsForums::getForumsInfo( const std::list& forumIds, std::v } else { - if( !requestGroupInfo(token, opts, forumIds) || waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) + if( !requestGroupInfo(token, opts, forumIds, forumIds.size()==1) || waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) return false; } return getGroupData(token, forumsInfo);