From: Victor Grishchenko Date: Fri, 26 Feb 2010 17:37:49 +0000 (+0100) Subject: precaution X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=cf8a1ee87956e12aa4d48d6584f6ff1f55227af6;p=swift-upb.git precaution --- diff --git a/send_control.cpp b/send_control.cpp index a1d1154..005b70c 100644 --- a/send_control.cpp +++ b/send_control.cpp @@ -23,6 +23,7 @@ const char* Channel::SEND_CONTROL_MODES[] = {"keepalive", "pingpong", tint Channel::NextSendTime () { + TimeoutDataOut(); // precaution to know free cwnd switch (send_control_) { case KEEP_ALIVE_CONTROL: return KeepAliveNextSendTime(); case PING_PONG_CONTROL: return PingPongNextSendTime(); diff --git a/sendrecv.cpp b/sendrecv.cpp index bfe1ee7..5fa703e 100644 --- a/sendrecv.cpp +++ b/sendrecv.cpp @@ -256,7 +256,7 @@ void Channel::AddHave (Datagram& dgram) { void Channel::Recv (Datagram& dgram) { - dprintf("%s #%u recvd %i\n",tintstr(),id_,dgram.size()+4); + dprintf("%s #%u recvd %ib\n",tintstr(),id_,dgram.size()+4); dgrams_rcvd_++; if (last_send_time_ && rtt_avg_==TINT_SEC && dev_avg_==0) { rtt_avg_ = NOW - last_send_time_; @@ -569,7 +569,6 @@ void Channel::Close () { void Channel::Reschedule () { - TimeoutDataOut(); // precaution to know free cwnd next_send_time_ = NextSendTime(); if (next_send_time_!=TINT_NEVER) { assert(next_send_time_