summaryrefslogtreecommitdiff
path: root/trackerlogic.c
diff options
context:
space:
mode:
Diffstat (limited to 'trackerlogic.c')
-rw-r--r--trackerlogic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trackerlogic.c b/trackerlogic.c
index 74fea6d..9705bd6 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -381,7 +381,7 @@ size_t return_peers_for_torrent(struct ot_workstruct *ws, ot_torrent *torrent, s
381size_t return_udp_scrape_for_torrent(ot_hash const hash, char *reply) { 381size_t return_udp_scrape_for_torrent(ot_hash const hash, char *reply) {
382 int exactmatch, delta_torrentcount = 0; 382 int exactmatch, delta_torrentcount = 0;
383 ot_vector *torrents_list = mutex_bucket_lock_by_hash(hash); 383 ot_vector *torrents_list = mutex_bucket_lock_by_hash(hash);
384 ot_torrent *torrent = binary_search(hash, torrents_list->data, torrents_list->size, sizeof(ot_torrent), OT_HASH_COMPARE_SIZE, &exactmatch); 384 ot_torrent *torrent = vector_binary_search(hash, torrents_list->data, torrents_list->size, sizeof(ot_torrent), OT_HASH_COMPARE_SIZE, &exactmatch);
385 385
386 if (!exactmatch) { 386 if (!exactmatch) {
387 memset(reply, 0, 12); 387 memset(reply, 0, 12);
@@ -414,7 +414,7 @@ size_t return_tcp_scrape_for_torrent(ot_hash const *hash_list, size_t amount, ch
414 int delta_torrentcount = 0; 414 int delta_torrentcount = 0;
415 ot_hash const *hash = hash_list + i; 415 ot_hash const *hash = hash_list + i;
416 ot_vector *torrents_list = mutex_bucket_lock_by_hash(*hash); 416 ot_vector *torrents_list = mutex_bucket_lock_by_hash(*hash);
417 ot_torrent *torrent = binary_search(hash, torrents_list->data, torrents_list->size, sizeof(ot_torrent), OT_HASH_COMPARE_SIZE, &exactmatch); 417 ot_torrent *torrent = vector_binary_search(hash, torrents_list->data, torrents_list->size, sizeof(ot_torrent), OT_HASH_COMPARE_SIZE, &exactmatch);
418 418
419 if (exactmatch) { 419 if (exactmatch) {
420 if (clean_single_torrent(torrent)) { 420 if (clean_single_torrent(torrent)) {
@@ -443,7 +443,7 @@ static ot_peerlist dummy_list;
443size_t remove_peer_from_torrent(PROTO_FLAG proto, struct ot_workstruct *ws) { 443size_t remove_peer_from_torrent(PROTO_FLAG proto, struct ot_workstruct *ws) {
444 int exactmatch; 444 int exactmatch;
445 ot_vector *torrents_list = mutex_bucket_lock_by_hash(*ws->hash); 445 ot_vector *torrents_list = mutex_bucket_lock_by_hash(*ws->hash);
446 ot_torrent *torrent = binary_search(ws->hash, torrents_list->data, torrents_list->size, sizeof(ot_torrent), OT_HASH_COMPARE_SIZE, &exactmatch); 446 ot_torrent *torrent = vector_binary_search(ws->hash, torrents_list->data, torrents_list->size, sizeof(ot_torrent), OT_HASH_COMPARE_SIZE, &exactmatch);
447 ot_peerlist *peer_list = &dummy_list; 447 ot_peerlist *peer_list = &dummy_list;
448 size_t peer_size; /* initialized in next line */ 448 size_t peer_size; /* initialized in next line */
449 ot_peer const *peer_src = peer_from_peer6(&ws->peer, &peer_size); 449 ot_peer const *peer_src = peer_from_peer6(&ws->peer, &peer_size);