bug fixing in Network Simulator

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7225 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-04-02 20:44:01 +00:00
parent afcded6c3b
commit 47c9971b5c
2 changed files with 5 additions and 8 deletions

View File

@ -129,7 +129,10 @@ class FakePublisher: public pqiPublisher
RsRawItem *outgoing() RsRawItem *outgoing()
{ {
RsRawItem *item = _item_queue.front() ; if(_item_queue.empty())
return NULL ;
RsRawItem *item = _item_queue.front() ;
_item_queue.pop_front() ; _item_queue.pop_front() ;
return item ; return item ;
} }

View File

@ -220,13 +220,7 @@ QString TurtleRouterStatistics::getPeerName(const RsPeerId& peer_id)
if( it != names.end()) if( it != names.end())
return it->second ; return it->second ;
else else
{ return (names[peer_id] = QString::fromStdString(peer_id.toStdString())) ;
RsPeerDetails detail ;
if(!rsPeers->getPeerDetails(peer_id,detail))
return tr("Unknown Peer");
return (names[peer_id] = QString::fromUtf8(detail.name.c_str())) ;
}
} }
TurtleRouterStatisticsWidget::TurtleRouterStatisticsWidget(QWidget *parent) TurtleRouterStatisticsWidget::TurtleRouterStatisticsWidget(QWidget *parent)