From: victor Date: Fri, 20 Nov 2009 14:48:43 +0000 (+0000) Subject: fast fix X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=d83dd9a3b067127c86ef91d483420159a58593ef;p=swift-upb.git fast fix git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@610 e16421f0-f15b-0410-abcd-98678b794739 --- diff --git a/ext/seq_picker.cpp b/ext/seq_picker.cpp index 74557eb..91222fe 100644 --- a/ext/seq_picker.cpp +++ b/ext/seq_picker.cpp @@ -64,7 +64,7 @@ public: hint = hint.left(); assert(ack_hint_out_.get(hint)==bins::EMPTY); ack_hint_out_.set(hint); - hint_out_.push_back(hint); + hint_out_.push_back(tintbin(NOW,hint)); return hint; } diff --git a/sendrecv.cpp b/sendrecv.cpp index bb62d37..6895739 100644 --- a/sendrecv.cpp +++ b/sendrecv.cpp @@ -337,7 +337,8 @@ void Channel::CleanDataOut (bin64_t ackd_pos) { } static const int MAX_REORDERING = 2; // the triple-ACK principle if (max_ack_off>MAX_REORDERING) { - while (max_ack_off && ack_in_.is_filled(data_out_.front().bin)) { + while (max_ack_off && (data_out_.front().bin==bin64_t::NONE + || ack_in_.is_filled(data_out_.front().bin)) ) { data_out_.pop_front(); max_ack_off--; } @@ -352,7 +353,7 @@ void Channel::CleanDataOut (bin64_t ackd_pos) { } tint timeout = NOW - rtt_avg_ - 4*std::max(dev_avg_,TINT_MSEC*50); while (!data_out_.empty() && data_out_.front().timeOnAckRcvd(bin64_t::NONE); data_out_cap_ = bin64_t::ALL; dprintf("%s #%i Tdata %s\n",tintstr(),id,data_out_.front().bin.str());