(trunk libT) #2792 "Since 1.80 update downloads failing" -- fixed in trunk for 1.83

This commit is contained in:
Charles Kerr 2010-01-25 04:54:04 +00:00
parent c2adab97b2
commit bfbc126ea0
1 changed files with 6 additions and 2 deletions

View File

@ -1140,9 +1140,13 @@ refillUpkeep( int foo UNUSED, short bar UNUSED, void * vmgr )
t->requestCount = keepCount;
/* send cancel messages for all the "cancel" ones */
for( it=cancel, end=it+cancelCount; it!=end; ++it )
if( ( it->peer != NULL ) && ( it->peer->msgs != NULL ) )
for( it=cancel, end=it+cancelCount; it!=end; ++it ) {
if( ( it->peer != NULL ) && ( it->peer->msgs != NULL ) ) {
tr_peerMsgsCancel( it->peer->msgs, it->block );
if( t->requestCount > 0 )
--t->requestCount;
}
}
/* decrement the pending request counts for the timed-out blocks */
for( it=cancel, end=it+cancelCount; it!=end; ++it )