diff options
Diffstat (limited to 'trackerlogic.c')
-rw-r--r-- | trackerlogic.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 9d564c1..81bee94 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -45,7 +45,7 @@ void free_peerlist( ot_peerlist *peer_list ) { | |||
45 | free( peer_list ); | 45 | free( peer_list ); |
46 | } | 46 | } |
47 | 47 | ||
48 | void add_torrent_from_saved_state( ot_hash hash, ot_time base, size_t down_count ) { | 48 | void add_torrent_from_saved_state( ot_hash const hash, ot_time base, size_t down_count ) { |
49 | int exactmatch; | 49 | int exactmatch; |
50 | ot_torrent *torrent; | 50 | ot_torrent *torrent; |
51 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( hash ); | 51 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( hash ); |
@@ -317,7 +317,7 @@ size_t return_peers_for_torrent( struct ot_workstruct * ws, ot_torrent *torrent, | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /* Fetches scrape info for a specific torrent */ | 319 | /* Fetches scrape info for a specific torrent */ |
320 | size_t return_udp_scrape_for_torrent( ot_hash hash, char *reply ) { | 320 | size_t return_udp_scrape_for_torrent( ot_hash const hash, char *reply ) { |
321 | int exactmatch, delta_torrentcount = 0; | 321 | int exactmatch, delta_torrentcount = 0; |
322 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( hash ); | 322 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( hash ); |
323 | ot_torrent *torrent = binary_search( hash, torrents_list->data, torrents_list->size, sizeof( ot_torrent ), OT_HASH_COMPARE_SIZE, &exactmatch ); | 323 | ot_torrent *torrent = binary_search( hash, torrents_list->data, torrents_list->size, sizeof( ot_torrent ), OT_HASH_COMPARE_SIZE, &exactmatch ); |
@@ -343,17 +343,17 @@ size_t return_udp_scrape_for_torrent( ot_hash hash, char *reply ) { | |||
343 | } | 343 | } |
344 | 344 | ||
345 | /* Fetches scrape info for a specific torrent */ | 345 | /* Fetches scrape info for a specific torrent */ |
346 | size_t return_tcp_scrape_for_torrent( ot_hash *hash_list, int amount, char *reply ) { | 346 | size_t return_tcp_scrape_for_torrent( ot_hash const *hash_list, int amount, char *reply ) { |
347 | char *r = reply; | 347 | char *r = reply; |
348 | int exactmatch, i; | 348 | int exactmatch, i; |
349 | 349 | ||
350 | r += sprintf( r, "d5:filesd" ); | 350 | r += sprintf( r, "d5:filesd" ); |
351 | 351 | ||
352 | for( i=0; i<amount; ++i ) { | 352 | for( i=0; i<amount; ++i ) { |
353 | int delta_torrentcount = 0; | 353 | int delta_torrentcount = 0; |
354 | ot_hash *hash = hash_list + i; | 354 | ot_hash const *hash = hash_list + i; |
355 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( *hash ); | 355 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( *hash ); |
356 | ot_torrent *torrent = binary_search( hash, torrents_list->data, torrents_list->size, sizeof( ot_torrent ), OT_HASH_COMPARE_SIZE, &exactmatch ); | 356 | ot_torrent *torrent = binary_search( hash, torrents_list->data, torrents_list->size, sizeof( ot_torrent ), OT_HASH_COMPARE_SIZE, &exactmatch ); |
357 | 357 | ||
358 | if( exactmatch ) { | 358 | if( exactmatch ) { |
359 | if( clean_single_torrent( torrent ) ) { | 359 | if( clean_single_torrent( torrent ) ) { |