improved debugDump(), showing the subscription status of each grp

This commit is contained in:
csoler 2016-03-13 12:08:03 -04:00
parent 5fe390d485
commit 9c649aa58c
2 changed files with 15 additions and 2 deletions

View File

@ -1844,6 +1844,13 @@ void RsGxsNetService::debugDump()
time_t now = time(NULL) ;
GXSNETDEBUG___<< "RsGxsNetService::debugDump():" << std::endl;
RsGxsMetaDataTemporaryMap<RsGxsGrpMetaData> grpMetas;
if(!group_id_to_print.isNull())
grpMetas[group_id_to_print] = NULL ;
mDataStore->retrieveGxsGrpMetaData(grpMetas);
if(mGrpServerUpdateItem != NULL)
GXSNETDEBUG___<< " mGrpServerUpdateItem time stamp: " << nice_time_stamp(time(NULL) , mGrpServerUpdateItem->grpUpdateTS) << " (is the last local modification time over all groups of this service)" << std::endl;
@ -1853,7 +1860,13 @@ void RsGxsNetService::debugDump()
GXSNETDEBUG___<< " mServerMsgUpdateMap: (is for each subscribed group, the last local modification time)" << std::endl;
for(std::map<RsGxsGroupId,RsGxsServerMsgUpdateItem*>::const_iterator it(mServerMsgUpdateMap.begin());it!=mServerMsgUpdateMap.end();++it)
GXSNETDEBUG__G(it->first) << " Grp:" << it->first << " last local modification (secs ago): " << nice_time_stamp(time(NULL),it->second->msgUpdateTS) << std::endl;
{
RsGxsMetaDataTemporaryMap<RsGxsGrpMetaData>::const_iterator it2 = grpMetas.find(it->first) ;
RsGxsGrpMetaData *grpMeta = (it2 != grpMetas.end())? it2->second : NULL;
std::string subscribe_string = (grpMeta==NULL)?"Unknown" : ((grpMeta->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED)?" Subscribed":" NOT Subscribed") ;
GXSNETDEBUG__G(it->first) << " Grp:" << it->first << " last local modification (secs ago): " << nice_time_stamp(time(NULL),it->second->msgUpdateTS) << ", " << subscribe_string << std::endl;
}
GXSNETDEBUG___<< " mClientGrpUpdateMap: (is for each friend, last modif time of group meta data at that friend, all groups included, sent by the friend himself)" << std::endl;

View File

@ -319,7 +319,7 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
ui->treeWidget_membership->addTopLevelItem(externalOtherCirclesItem);
QTreeWidgetItem *externalSubCirclesItem = new QTreeWidgetItem();
externalSubCirclesItem->setText(0, tr("Circles I belong to)"));
externalSubCirclesItem->setText(0, tr("Circles I belong to"));
ui->treeWidget_membership->addTopLevelItem(externalSubCirclesItem);
QTreeWidgetItem *externalAdminCirclesItem = new QTreeWidgetItem();