summaryrefslogtreecommitdiff
path: root/trackerlogic.c
diff options
context:
space:
mode:
Diffstat (limited to 'trackerlogic.c')
-rw-r--r--trackerlogic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trackerlogic.c b/trackerlogic.c
index b9f14f0..e9b9b2e 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -203,7 +203,7 @@ size_t return_peers_for_torrent( ot_torrent *torrent, unsigned long amount, char
203 } 203 }
204 if( peer_count < amount ) amount = peer_count; 204 if( peer_count < amount ) amount = peer_count;
205 205
206 r += FORMAT_FORMAT_STRING( r, "d5:peers%li:",6*amount ); 206 r += FORMAT_FORMAT_STRING( r, "d8:completei%lie10:incompletei%lie8:intervali60e5:peers%li:", seed_count, peer_count-seed_count, 6*amount );
207 for( index = 0; index < amount; ++index ) { 207 for( index = 0; index < amount; ++index ) {
208 double step = 1.8*((double)( peer_count - wert - 1 ))/((double)( amount - index )); 208 double step = 1.8*((double)( peer_count - wert - 1 ))/((double)( amount - index ));
209 int off = random() % (int)floor( step ); 209 int off = random() % (int)floor( step );
@@ -222,7 +222,7 @@ size_t return_peers_for_torrent( ot_torrent *torrent, unsigned long amount, char
222 MEMMOVE( r, ((ot_peer*)torrent->peer_list->peers[pool_index].data) + pool_offset, 6 ); 222 MEMMOVE( r, ((ot_peer*)torrent->peer_list->peers[pool_index].data) + pool_offset, 6 );
223 r += 6; 223 r += 6;
224 } 224 }
225 r += FORMAT_FORMAT_STRING( r, "8:completei%lie10:incompletei%lie8:intervali60ee", seed_count, peer_count-seed_count ); 225 *r++ = 'e';
226 226
227 return r - reply; 227 return r - reply;
228} 228}