From: victor Date: Fri, 13 Nov 2009 10:30:41 +0000 (+0000) Subject: late delivery bug X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=1a36651860b01a60227a84b4ad0415a1c55537f8;p=swift-upb.git late delivery bug git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@547 e16421f0-f15b-0410-abcd-98678b794739 --- diff --git a/ext/seq_picker.cpp b/ext/seq_picker.cpp index c97a2b0..3cacb2b 100644 --- a/ext/seq_picker.cpp +++ b/ext/seq_picker.cpp @@ -65,4 +65,8 @@ public: return hint; } + void Received (bin64_t bin) { + ack_hint_out_.set(bin); + } + }; diff --git a/p2tp.h b/p2tp.h index df64b2a..d068c0a 100644 --- a/p2tp.h +++ b/p2tp.h @@ -188,6 +188,7 @@ namespace p2tp { public: virtual void Randomize (uint64_t twist) = 0; virtual bin64_t Pick (bins& offered, uint64_t max_width, tint expires) = 0; + virtual void Received (bin64_t bin) = 0; }; diff --git a/sendrecv.cpp b/sendrecv.cpp index 721e22a..511b018 100644 --- a/sendrecv.cpp +++ b/sendrecv.cpp @@ -292,6 +292,7 @@ bin64_t Channel::OnData (Datagram& dgram) { if (!ok) return bin64_t::NONE; data_in_ = tintbin(NOW,pos); + transfer().picker().Received(pos); // FIXME ugly if (last_data_time_) { tint dip = NOW - last_data_time_; dip_avg_ = ( dip_avg_*3 + dip ) >> 2;