fixed bug causing display of null group in GxsTransportStatistics

This commit is contained in:
csoler 2017-06-02 23:26:24 +02:00
parent fb7ac7a8f6
commit e3cd3b6f6c

View File

@ -330,8 +330,6 @@ void GxsTransportStatistics::requestGroupMeta()
std::cerr << std::endl;
#endif
mTransQueue->cancelActiveRequestTokens(GXSTRANS_GROUP_META);
RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_GROUP_META;
@ -340,7 +338,6 @@ void GxsTransportStatistics::requestGroupMeta()
}
void GxsTransportStatistics::requestGroupStat(const RsGxsGroupId &groupId)
{
mTransQueue->cancelActiveRequestTokens(GXSTRANS_GROUP_STAT);
uint32_t token;
rsGxsTrans->getTokenService()->requestGroupStatistic(token, groupId);
mTransQueue->queueRequest(token, 0, RS_TOKREQ_ANSTYPE_ACK, GXSTRANS_GROUP_STAT);
@ -354,8 +351,6 @@ void GxsTransportStatistics::requestMsgMeta(const RsGxsGroupId& grpId)
std::cerr << std::endl;
#endif
mTransQueue->cancelActiveRequestTokens(GXSTRANS_MSG_META);
RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_MSG_META;
@ -369,12 +364,10 @@ void GxsTransportStatistics::requestMsgMeta(const RsGxsGroupId& grpId)
void GxsTransportStatistics::loadGroupStat(const uint32_t &token)
{
#ifdef DEBUG_GXSTRANS_STATS
std::cerr << "GxsTransportStatistics::loadGroupStat." << std::endl;
#endif
GxsGroupStatistic stats;
rsGxsTrans->getGroupStatistic(token, stats);
std::cerr << "Loading group stats: " << stats.mGrpId << ", num msgs=" << stats.mNumMsgs << ", total size=" << stats.mTotalSizeOfMsgs << std::endl;
dynamic_cast<GxsGroupStatistic&>(mGroupStats[stats.mGrpId]) = stats ;
}