mirror of
git://erdgeist.org/opentracker
synced 2025-01-14 00:40:09 +00:00
casting does floor() by itself
This commit is contained in:
parent
805e46450c
commit
575bf7081f
7
README
7
README
@ -19,3 +19,10 @@ This tracker is open in a sense that everyone announcing a torrent is welcome to
|
|||||||
-DWANT_IP_FROM_QUERY_STRING is enabled (which is meant for debugging purposes only), only source IPs are accepted. The tracker implements a minimal set of
|
-DWANT_IP_FROM_QUERY_STRING is enabled (which is meant for debugging purposes only), only source IPs are accepted. The tracker implements a minimal set of
|
||||||
essential features only but was able respond to far more than 10000 requests per second on a Sun Fire 2200 M2 (thats where we found no more clients able to fire
|
essential features only but was able respond to far more than 10000 requests per second on a Sun Fire 2200 M2 (thats where we found no more clients able to fire
|
||||||
more of our testsuite.sh script).
|
more of our testsuite.sh script).
|
||||||
|
|
||||||
|
Some tweaks you may want to try under FreeBSD:
|
||||||
|
|
||||||
|
sysctl kern.ipc.somaxconn=1024
|
||||||
|
sysctl kern.ipc.nmbclusters=32768
|
||||||
|
sysctl net.inet.tcp.msl=10000
|
||||||
|
sysctl kern.maxfiles=10240
|
||||||
|
@ -256,7 +256,7 @@ size_t return_peers_for_torrent( ot_torrent *torrent, unsigned int amount, char
|
|||||||
r += sprintf( r, "d8:completei%ie10:incompletei%ie8:intervali600e5:peers%i:", seed_count, peer_count-seed_count, 6*amount );
|
r += sprintf( r, "d8:completei%ie10:incompletei%ie8:intervali600e5:peers%i:", seed_count, peer_count-seed_count, 6*amount );
|
||||||
for( index = 0; index < amount; ++index ) {
|
for( index = 0; index < amount; ++index ) {
|
||||||
double step = 1.8*((double)( peer_count - wert - 1 ))/((double)( amount - index ));
|
double step = 1.8*((double)( peer_count - wert - 1 ))/((double)( amount - index ));
|
||||||
int off = random() % (int)floor( step );
|
int off = random() % (int)step;
|
||||||
off = 1 + ( off % ( peer_count - wert - 1 ));
|
off = 1 + ( off % ( peer_count - wert - 1 ));
|
||||||
wert += off; pool_offset += off;
|
wert += off; pool_offset += off;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user