diff options
Diffstat (limited to 'trackerlogic.c')
-rw-r--r-- | trackerlogic.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 81bee94..a0bbeb4 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -78,13 +78,13 @@ void add_torrent_from_saved_state( ot_hash const hash, ot_time base, size_t down | |||
78 | } | 78 | } |
79 | 79 | ||
80 | size_t add_peer_to_torrent_and_return_peers( PROTO_FLAG proto, struct ot_workstruct *ws, size_t amount ) { | 80 | size_t add_peer_to_torrent_and_return_peers( PROTO_FLAG proto, struct ot_workstruct *ws, size_t amount ) { |
81 | int exactmatch, delta_torrentcount = 0; | 81 | int exactmatch, delta_torrentcount = 0; |
82 | ot_torrent *torrent; | 82 | ot_torrent *torrent; |
83 | ot_peer *peer_dest; | 83 | ot_peer *peer_dest; |
84 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( *ws->hash ); | 84 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( *ws->hash ); |
85 | ot_peerlist *peer_list; | 85 | ot_peerlist *peer_list; |
86 | size_t peer_size; /* initialized in next line */ | 86 | size_t peer_size; /* initialized in next line */ |
87 | ot_peer *peer_src = peer_from_peer6(&ws->peer, &peer_size); | 87 | ot_peer const *peer_src = peer_from_peer6(&ws->peer, &peer_size); |
88 | 88 | ||
89 | if( !accesslist_hashisvalid( *ws->hash ) ) { | 89 | if( !accesslist_hashisvalid( *ws->hash ) ) { |
90 | mutex_bucket_unlock_by_hash( *ws->hash, 0 ); | 90 | mutex_bucket_unlock_by_hash( *ws->hash, 0 ); |
@@ -378,12 +378,12 @@ size_t return_tcp_scrape_for_torrent( ot_hash const *hash_list, int amount, char | |||
378 | 378 | ||
379 | static ot_peerlist dummy_list; | 379 | static ot_peerlist dummy_list; |
380 | size_t remove_peer_from_torrent( PROTO_FLAG proto, struct ot_workstruct *ws ) { | 380 | size_t remove_peer_from_torrent( PROTO_FLAG proto, struct ot_workstruct *ws ) { |
381 | int exactmatch; | 381 | int exactmatch; |
382 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( *ws->hash ); | 382 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( *ws->hash ); |
383 | ot_torrent *torrent = binary_search( ws->hash, torrents_list->data, torrents_list->size, sizeof( ot_torrent ), OT_HASH_COMPARE_SIZE, &exactmatch ); | 383 | ot_torrent *torrent = binary_search( ws->hash, torrents_list->data, torrents_list->size, sizeof( ot_torrent ), OT_HASH_COMPARE_SIZE, &exactmatch ); |
384 | ot_peerlist *peer_list = &dummy_list; | 384 | ot_peerlist *peer_list = &dummy_list; |
385 | size_t peer_size; /* initialized in next line */ | 385 | size_t peer_size; /* initialized in next line */ |
386 | ot_peer *peer_src = peer_from_peer6(&ws->peer, &peer_size); | 386 | ot_peer const *peer_src = peer_from_peer6(&ws->peer, &peer_size); |
387 | 387 | ||
388 | #ifdef WANT_SYNC_LIVE | 388 | #ifdef WANT_SYNC_LIVE |
389 | if( proto != FLAG_MCA ) { | 389 | if( proto != FLAG_MCA ) { |