From e8d19c5b03949aba1ad6ac4a4c87491288009988 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 9 Oct 2007 05:51:20 +0000 Subject: [PATCH] fix stupid bug from yesterday that made uploading difficult. --- libtransmission/peer-msgs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index c78ead973..e9df717a8 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -272,7 +272,6 @@ fireNeedReq( tr_peermsgs * msgs ) { tr_peermsgs_event e = blankEvent; e.eventType = TR_PEERMSG_NEED_REQ; - dbgmsg( msgs, "firing NEED_REQ" ); publish( msgs, &e ); } @@ -1405,7 +1404,7 @@ pulse( void * vmsgs ) uint8_t * buf = tr_new( uint8_t, r->length ); if( requestIsValid( msgs, r ) - && tr_bitfieldHas( msgs->info->have, r->index ) + && tr_cpPieceIsComplete( msgs->torrent->completion, r->index ) && !tr_ioRead( msgs->torrent, r->index, r->offset, r->length, buf ) ) { protocolSendPiece( msgs, r, buf );