diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 17:13:36 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 17:13:36 +0100 |
| commit | 6837c5ac80e3624c6dc3a82d03e50d68b2f5a989 (patch) | |
| tree | f829fa152980cefec412483b240813432c9406d7 /ot_fullscrape.c | |
| parent | 6871825565d0ba24436dbd5b92cc09e02f93af6a (diff) | |
Second run of making variable and function names more readable, urlencoder now matches overall naming scheme
Diffstat (limited to 'ot_fullscrape.c')
| -rw-r--r-- | ot_fullscrape.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 788e574..0dee5c2 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include "ot_fullscrape.h" | 25 | #include "ot_fullscrape.h" |
| 26 | #include "ot_iovec.h" | 26 | #include "ot_iovec.h" |
| 27 | #include "ot_mutex.h" | 27 | #include "ot_mutex.h" |
| 28 | #include "scan_urlencoded_query.h" | 28 | #include "ot_urlencoded.h" |
| 29 | #include "trackerlogic.h" | 29 | #include "trackerlogic.h" |
| 30 | 30 | ||
| 31 | /* Fetch full scrape info for all torrents | 31 | /* Fetch full scrape info for all torrents |
| @@ -105,12 +105,12 @@ static char * fullscrape_write_one( ot_tasktype mode, char *r, ot_torrent *torre | |||
| 105 | 105 | ||
| 106 | break; | 106 | break; |
| 107 | case TASK_FULLSCRAPE_TPB_ASCII: | 107 | case TASK_FULLSCRAPE_TPB_ASCII: |
| 108 | hex_fromhash(r, *hash); | 108 | hex_from_hash(r, *hash); |
| 109 | r += 2 * sizeof(ot_hash); | 109 | r += 2 * sizeof(ot_hash); |
| 110 | r += sprintf(r, ":%zd:%zd\n", seed_count, peer_count - seed_count); | 110 | r += sprintf(r, ":%zd:%zd\n", seed_count, peer_count - seed_count); |
| 111 | break; | 111 | break; |
| 112 | case TASK_FULLSCRAPE_TPB_ASCII_PLUS: | 112 | case TASK_FULLSCRAPE_TPB_ASCII_PLUS: |
| 113 | hex_fromhash(r, *hash); | 113 | hex_from_hash(r, *hash); |
| 114 | r += 2 * sizeof(ot_hash); | 114 | r += 2 * sizeof(ot_hash); |
| 115 | r += sprintf(r, ":%zd:%zd:%zd\n", seed_count, peer_count - seed_count, down_count); | 115 | r += sprintf(r, ":%zd:%zd:%zd\n", seed_count, peer_count - seed_count, down_count); |
| 116 | break; | 116 | break; |
| @@ -126,7 +126,7 @@ static char * fullscrape_write_one( ot_tasktype mode, char *r, ot_torrent *torre | |||
| 126 | r += sprintf(r, ":%zd:%zd\n", seed_count, peer_count - seed_count); | 126 | r += sprintf(r, ":%zd:%zd\n", seed_count, peer_count - seed_count); |
| 127 | break; | 127 | break; |
| 128 | case TASK_FULLSCRAPE_TRACKERSTATE: | 128 | case TASK_FULLSCRAPE_TRACKERSTATE: |
| 129 | hex_fromhash(r, *hash); | 129 | hex_from_hash(r, *hash); |
| 130 | r += 2 * sizeof(ot_hash); | 130 | r += 2 * sizeof(ot_hash); |
| 131 | r += sprintf(r, ":%zd:%zd\n", torrent->peer_list6->base, down_count); | 131 | r += sprintf(r, ":%zd:%zd\n", torrent->peer_list6->base, down_count); |
| 132 | break; | 132 | break; |
| @@ -296,7 +296,7 @@ static void fullscrape_make_gzip(int taskid, ot_tasktype mode) { | |||
| 296 | iovector.iov_base = malloc(OT_SCRAPE_CHUNK_SIZE); | 296 | iovector.iov_base = malloc(OT_SCRAPE_CHUNK_SIZE); |
| 297 | 297 | ||
| 298 | if (!iovector.iov_base) { | 298 | if (!iovector.iov_base) { |
| 299 | fprintf(stderr, "Problem with iovec_fix_increase_or_free\n"); | 299 | fprintf(stderr, "Problem with iovec_next_chunk\n"); |
| 300 | deflateEnd(&strm); | 300 | deflateEnd(&strm); |
| 301 | return; | 301 | return; |
| 302 | } | 302 | } |
| @@ -422,7 +422,7 @@ static void fullscrape_make_zstd(int taskid, ot_tasktype mode) { | |||
| 422 | iovector.iov_base = malloc(OT_SCRAPE_CHUNK_SIZE); | 422 | iovector.iov_base = malloc(OT_SCRAPE_CHUNK_SIZE); |
| 423 | 423 | ||
| 424 | if (!iovector.iov_base) { | 424 | if (!iovector.iov_base) { |
| 425 | fprintf(stderr, "Problem with iovec_fix_increase_or_free\n"); | 425 | fprintf(stderr, "Problem with iovec_next_chunk\n"); |
| 426 | ZSTD_freeCCtx(zstream); | 426 | ZSTD_freeCCtx(zstream); |
| 427 | return; | 427 | return; |
| 428 | } | 428 | } |
