redundant hinting
authorvictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Wed, 11 Nov 2009 09:15:04 +0000 (09:15 +0000)
committervictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Wed, 11 Nov 2009 09:15:04 +0000 (09:15 +0000)
git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@533 e16421f0-f15b-0410-abcd-98678b794739

BUGS
sendrecv.cpp

diff --git a/BUGS b/BUGS
index 92c7fdf..6815bee 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -22,3 +22,4 @@
     * RecoverProgress fails sometime
     * leecher can't see file is done already
     * why leecher waits 1sec?
+    * hint queue buildup
index 07ee8e1..7610ed8 100644 (file)
@@ -143,11 +143,12 @@ void      Channel::AddHint (Datagram& dgram) {
         tintbin f = hint_out_.front();
         if (f.time<NOW-rtt_avg_*8) {
             hint_out_.pop_front();
+            dprintf("%s #%i !hint (%i,%lli)\n",
+                    tintstr(),id,(int)f.bin.layer(),f.bin.offset());
             transfer().picker().Expired(f.bin);
         } else {
             int status = file().ack_out().get(f.bin);
             if (status==bins::EMPTY) {
-                transfer().picker().Expired(f.bin);
                 break;
             } else if (status==bins::FILLED) {
                 hint_out_.pop_front();
@@ -156,7 +157,7 @@ void        Channel::AddHint (Datagram& dgram) {
                 hint_out_.front().bin = f.bin.right();
                 f.bin = f.bin.left();
                 hint_out_.push_front(f);
-            }
+            } // FIXME: simplify this mess
         }
     }
     /*while (!hint_out_.empty() &&