From 5340c098f467fa1fe24bece9b64b2bb253884bb7 Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 14 Nov 2009 18:30:40 +0000 Subject: [PATCH] it more or less works this way git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@556 e16421f0-f15b-0410-abcd-98678b794739 --- sendrecv.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sendrecv.cpp b/sendrecv.cpp index c570c18..5bd424c 100644 --- a/sendrecv.cpp +++ b/sendrecv.cpp @@ -153,7 +153,7 @@ void Channel::AddHint (Datagram& dgram) { if (!peer_pps) peer_pps = 1; - if ( hint_out_mass < 4*peer_cwnd ) { + if ( hint_out_mass < peer_pps ) { //4*peer_cwnd ) { int diff = 5*peer_cwnd - hint_out_mass; if (diff>4 && diff>2*peer_cwnd) @@ -228,7 +228,7 @@ void Channel::AddTs (Datagram& dgram) { void Channel::AddAck (Datagram& dgram) { if (data_in_.bin!=bin64_t::NONE) { AddTs(dgram); - bin64_t pos = data_in_.bin; + bin64_t pos = file().ack_out().cover(data_in_.bin); dgram.Push8(P2TP_ACK); dgram.Push32(pos); //dgram.Push64(data_in_.time); @@ -498,4 +498,4 @@ void Channel::Schedule (tint next_time) { next_time = NOW + TINT_MIN; // 1min timeout send_queue.push(tintbin(next_time,id)); dprintf("%s requeue #%i for %s\n",tintstr(),id,tintstr(next_time)); -} \ No newline at end of file +} -- 2.20.1