From 1a36651860b01a60227a84b4ad0415a1c55537f8 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 13 Nov 2009 10:30:41 +0000 Subject: [PATCH] late delivery bug git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@547 e16421f0-f15b-0410-abcd-98678b794739 --- ext/seq_picker.cpp | 4 ++++ p2tp.h | 1 + sendrecv.cpp | 1 + 3 files changed, 6 insertions(+) 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; -- 2.20.1