fixed missing update of transferred bytes count, that caused tunnels to not show a correct speed estimate on server side

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6768 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-09-26 18:38:35 +00:00
parent a98f1d90b0
commit f25f46dffb

View File

@ -1191,21 +1191,24 @@ void p3turtle::sendTurtleData(const std::string& virtual_peer_id,RsTurtleGeneric
item->tunnel_id = tunnel_id ; // we should randomly select a tunnel, or something more clever.
std::string ownid = mLinkMgr->getOwnId() ;
uint32_t ss = item->serial_size() ;
if(item->shouldStampTunnel())
tunnel.time_stamp = time(NULL) ;
tunnel.transfered_bytes += ss ;
if(tunnel.local_src == ownid)
{
item->setTravelingDirection(RsTurtleGenericTunnelItem::DIRECTION_SERVER) ;
item->PeerId(tunnel.local_dst) ;
_traffic_info_buffer.data_dn_Bps += item->serial_size() ;
_traffic_info_buffer.data_dn_Bps += ss ;
}
else if(tunnel.local_dst == ownid)
{
item->setTravelingDirection(RsTurtleGenericTunnelItem::DIRECTION_CLIENT) ;
item->PeerId(tunnel.local_src) ;
_traffic_info_buffer.data_up_Bps += item->serial_size() ;
_traffic_info_buffer.data_up_Bps += ss ;
}
else
{