summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opentracker.c1
-rw-r--r--trackerlogic.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/opentracker.c b/opentracker.c
index b7c1f6a..124bedc 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -233,6 +233,7 @@ e400:
233 if(!byte_diff(data,7,"numwant")) { 233 if(!byte_diff(data,7,"numwant")) {
234 size_t len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ); 234 size_t len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE );
235 if( ( len <= 0 ) || scan_fixed_int( data, len, &numwant ) ) goto e404; 235 if( ( len <= 0 ) || scan_fixed_int( data, len, &numwant ) ) goto e404;
236 if( numwant > 200 ) numwant = 200;
236 } else if(!byte_diff(data,7,"compact")) { 237 } else if(!byte_diff(data,7,"compact")) {
237 size_t len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ); 238 size_t len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE );
238 if( ( len <= 0 ) || scan_fixed_int( data, len, &tmp ) ) goto e404; 239 if( ( len <= 0 ) || scan_fixed_int( data, len, &tmp ) ) goto e404;
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 );