summaryrefslogtreecommitdiff
path: root/trackerlogic.c
diff options
context:
space:
mode:
authorerdgeist <>2007-01-06 22:24:09 +0000
committererdgeist <>2007-01-06 22:24:09 +0000
commit17c21a0bc4394ac6f0649b4b9c535554a0d8ace0 (patch)
treec8297c00b75b0cc5757c36f81561f8d7e26bf991 /trackerlogic.c
parente7532408b6ffb91ee366075aba4ef2a9ab74e3ed (diff)
Apply some limits
Diffstat (limited to 'trackerlogic.c')
-rw-r--r--trackerlogic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trackerlogic.c b/trackerlogic.c
index 9165fb7..c69da43 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -246,7 +246,7 @@ size_t return_peers_for_torrent( ot_torrent *torrent, unsigned long amount, char
246 } 246 }
247 if( peer_count < amount ) amount = peer_count; 247 if( peer_count < amount ) amount = peer_count;
248 248
249 r += FORMAT_FORMAT_STRING( r, "d8:completei%lie10:incompletei%lie8:intervali60e5:peers%li:", seed_count, peer_count-seed_count, 6*amount ); 249 r += FORMAT_FORMAT_STRING( r, "d8:completei%lie10:incompletei%lie8:intervali600e5:peers%li:", seed_count, peer_count-seed_count, 6*amount );
250 for( index = 0; index < amount; ++index ) { 250 for( index = 0; index < amount; ++index ) {
251 double step = 1.8*((double)( peer_count - wert - 1 ))/((double)( amount - index )); 251 double step = 1.8*((double)( peer_count - wert - 1 ))/((double)( amount - index ));
252 int off = random() % (int)floor( step ); 252 int off = random() % (int)floor( step );