From: victor Date: Wed, 18 Nov 2009 13:49:22 +0000 (+0000) Subject: more logging X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=40f0392c758332d9def31121aaae80a40128c892;p=swift-upb.git more logging git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@582 e16421f0-f15b-0410-abcd-98678b794739 --- diff --git a/sendrecv.cpp b/sendrecv.cpp index fb8493e..e059289 100644 --- a/sendrecv.cpp +++ b/sendrecv.cpp @@ -70,7 +70,7 @@ bin64_t Channel::DequeueHint () { // TODO: resilience uint64_t mass = 0; for(int i=0; i4 && diff>2*peer_cwnd) - diff >>= 1; + + int diff = peer_pps - hint_out_mass; + //if (diff>4 && diff>2*peer_cwnd) + // diff >>= 1; bin64_t hint = transfer().picker().Pick(ack_in_,diff,rtt_avg_*8+TINT_MSEC*100); if (hint!=bin64_t::NONE) { @@ -170,7 +170,7 @@ void Channel::AddHint (Datagram& dgram) { dprintf("%s #%i +hint %s [%lli]\n",tintstr(),id,hint.str(),hint_out_mass); hint_out_.push_back(hint); } else - printf("%s #%i Xhint\n",tintstr(),id); + dprintf("%s #%i .hint\n",tintstr(),id); } } @@ -261,6 +261,7 @@ void Channel::AddAck (Datagram& dgram) { void Channel::Recv (Datagram& dgram) { + dprintf("%s #%i recvd %i\n",tintstr(),id,dgram.size()+4); if (last_send_time_ && rtt_avg_==TINT_SEC && dev_avg_==0) { rtt_avg_ = NOW - last_send_time_; dev_avg_ = rtt_avg_;