Don't use read_enabled in get_rb_size.

We're no longer maintaining read_enabled, as there are simpler ways of
doing the same.  Additionally, we used RBDrained incorrectly.
This commit is contained in:
Juliusz Chroboczek 2011-02-18 00:36:27 +00:00
parent 77c034122e
commit c9c2ad7c57
1 changed files with 1 additions and 5 deletions

View File

@ -407,11 +407,7 @@ utp_get_rb_size(void *closure)
size_t bytes;
assert( tr_isPeerIo( io ) );
if( io->read_enabled )
bytes =
tr_bandwidthClamp( &io->bandwidth, TR_DOWN, UTP_READ_BUFFER_SIZE );
else
bytes = 0;
bytes = tr_bandwidthClamp( &io->bandwidth, TR_DOWN, UTP_READ_BUFFER_SIZE );
return UTP_READ_BUFFER_SIZE - bytes;
}