fix oops
This commit is contained in:
parent
412f0b40a2
commit
aad2a886be
|
@ -1323,10 +1323,6 @@ myHandshakeDoneCB( tr_handshake * handshake,
|
||||||
tr_peerIoSetParent( peer->io, t->tor->bandwidth );
|
tr_peerIoSetParent( peer->io, t->tor->bandwidth );
|
||||||
tr_peerMsgsNew( t->tor, peer, peerCallbackFunc, t, &peer->msgsTag );
|
tr_peerMsgsNew( t->tor, peer, peerCallbackFunc, t, &peer->msgsTag );
|
||||||
|
|
||||||
#warning do not check this code in it is for personal use only
|
|
||||||
if( peer_id && !memcmp( peer_id, "-TR", 3 ) )
|
|
||||||
peer->io->bandwidth.priority = TR_PRI_HIGH;
|
|
||||||
|
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1769,22 +1769,6 @@ fillOutputBuffer( tr_peermsgs * msgs, time_t now )
|
||||||
tr_peerIoWriteBuf( io, out, TRUE );
|
tr_peerIoWriteBuf( io, out, TRUE );
|
||||||
bytesWritten += EVBUFFER_LENGTH( out );
|
bytesWritten += EVBUFFER_LENGTH( out );
|
||||||
msgs->clientSentAnythingAt = now;
|
msgs->clientSentAnythingAt = now;
|
||||||
|
|
||||||
if( tr_cryptoWeakRandInt( 100 ) >= 50 ) /* only cheat sometimes... */
|
|
||||||
{
|
|
||||||
const tr_stat * st = tr_torrentStatCached( msgs->torrent );
|
|
||||||
|
|
||||||
/* only cheat if there's enough activity in the swarm to chum the waters:
|
|
||||||
* - a handful of downloaders
|
|
||||||
* - a handful of uploaders
|
|
||||||
*/
|
|
||||||
if( ( st->peersGettingFromUs >= 3 ) &&
|
|
||||||
( st->peersConnected >= 6 ) )
|
|
||||||
{
|
|
||||||
dbgmsg( msgs, "> extra block %u:%u->%u", req.index, req.offset, req.length );
|
|
||||||
msgs->torrent->uploadedCur += req.length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
evbuffer_free( out );
|
evbuffer_free( out );
|
||||||
|
|
Loading…
Reference in New Issue