diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 16:59:39 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 16:59:39 +0100 |
| commit | 6871825565d0ba24436dbd5b92cc09e02f93af6a (patch) | |
| tree | 0fbd4f05de5997d74bbc4f65d55a611e650ee83f /trackerlogic.c | |
| parent | 5e86efde052760a53ca92ddd411db095fcf4a970 (diff) | |
First run of making variable names more readable
Diffstat (limited to 'trackerlogic.c')
| -rw-r--r-- | trackerlogic.c | 6 |
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 | |||
| 381 | size_t return_udp_scrape_for_torrent(ot_hash const hash, char *reply) { | 381 | size_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; | |||
| 443 | size_t remove_peer_from_torrent(PROTO_FLAG proto, struct ot_workstruct *ws) { | 443 | size_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); |
