mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
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:
parent
a98f1d90b0
commit
f25f46dffb
1 changed files with 5 additions and 2 deletions
|
@ -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.
|
item->tunnel_id = tunnel_id ; // we should randomly select a tunnel, or something more clever.
|
||||||
|
|
||||||
std::string ownid = mLinkMgr->getOwnId() ;
|
std::string ownid = mLinkMgr->getOwnId() ;
|
||||||
|
uint32_t ss = item->serial_size() ;
|
||||||
|
|
||||||
if(item->shouldStampTunnel())
|
if(item->shouldStampTunnel())
|
||||||
tunnel.time_stamp = time(NULL) ;
|
tunnel.time_stamp = time(NULL) ;
|
||||||
|
|
||||||
|
tunnel.transfered_bytes += ss ;
|
||||||
|
|
||||||
if(tunnel.local_src == ownid)
|
if(tunnel.local_src == ownid)
|
||||||
{
|
{
|
||||||
item->setTravelingDirection(RsTurtleGenericTunnelItem::DIRECTION_SERVER) ;
|
item->setTravelingDirection(RsTurtleGenericTunnelItem::DIRECTION_SERVER) ;
|
||||||
item->PeerId(tunnel.local_dst) ;
|
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)
|
else if(tunnel.local_dst == ownid)
|
||||||
{
|
{
|
||||||
item->setTravelingDirection(RsTurtleGenericTunnelItem::DIRECTION_CLIENT) ;
|
item->setTravelingDirection(RsTurtleGenericTunnelItem::DIRECTION_CLIENT) ;
|
||||||
item->PeerId(tunnel.local_src) ;
|
item->PeerId(tunnel.local_src) ;
|
||||||
_traffic_info_buffer.data_up_Bps += item->serial_size() ;
|
_traffic_info_buffer.data_up_Bps += ss ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue