diff options
Diffstat (limited to 'ot_fullscrape.c')
| -rw-r--r-- | ot_fullscrape.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c index eade79d..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; |
| @@ -122,11 +122,11 @@ static char * fullscrape_write_one( ot_tasktype mode, char *r, ot_torrent *torre | |||
| 122 | r += 8; | 122 | r += 8; |
| 123 | break; | 123 | break; |
| 124 | case TASK_FULLSCRAPE_TPB_URLENCODED: | 124 | case TASK_FULLSCRAPE_TPB_URLENCODED: |
| 125 | r += fmt_urlencoded(r, *hash, sizeof(ot_hash)); | 125 | r += urlencoded_format(r, *hash, sizeof(ot_hash)); |
| 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 | } |
