diff options
-rw-r--r-- | ot_fullscrape.c | 4 | ||||
-rw-r--r-- | ot_http.c | 2 | ||||
-rw-r--r-- | ot_mutex.h | 5 |
3 files changed, 8 insertions, 3 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 89db2f1..faea4b9 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c | |||
@@ -175,6 +175,10 @@ static void fullscrape_make( int *iovec_entries, struct iovec **iovector, ot_tas | |||
175 | to_hex( r, *hash ); r+= 2 * sizeof(ot_hash); | 175 | to_hex( r, *hash ); r+= 2 * sizeof(ot_hash); |
176 | r += sprintf( r, ":%zd:%zd\n", peer_list->seed_count, peer_list->peer_count-peer_list->seed_count ); | 176 | r += sprintf( r, ":%zd:%zd\n", peer_list->seed_count, peer_list->peer_count-peer_list->seed_count ); |
177 | break; | 177 | break; |
178 | case TASK_FULLSCRAPE_TPB_ASCII_PLUS: | ||
179 | to_hex( r, *hash ); r+= 2 * sizeof(ot_hash); | ||
180 | r += sprintf( r, ":%zd:%zd:%zd\n", peer_list->seed_count, peer_list->peer_count-peer_list->seed_count, peer_list->down_count ); | ||
181 | break; | ||
178 | case TASK_FULLSCRAPE_TPB_BINARY: | 182 | case TASK_FULLSCRAPE_TPB_BINARY: |
179 | memcpy( r, *hash, sizeof(ot_hash) ); r += sizeof(ot_hash); | 183 | memcpy( r, *hash, sizeof(ot_hash) ); r += sizeof(ot_hash); |
180 | *(uint32_t*)(r+0) = htonl( (uint32_t) peer_list->seed_count ); | 184 | *(uint32_t*)(r+0) = htonl( (uint32_t) peer_list->seed_count ); |
@@ -184,7 +184,7 @@ static const ot_keywords keywords_mode[] = | |||
184 | { NULL, -3 } }; | 184 | { NULL, -3 } }; |
185 | static const ot_keywords keywords_format[] = | 185 | static const ot_keywords keywords_format[] = |
186 | { { "bin", TASK_FULLSCRAPE_TPB_BINARY }, { "ben", TASK_FULLSCRAPE }, { "url", TASK_FULLSCRAPE_TPB_URLENCODED }, | 186 | { { "bin", TASK_FULLSCRAPE_TPB_BINARY }, { "ben", TASK_FULLSCRAPE }, { "url", TASK_FULLSCRAPE_TPB_URLENCODED }, |
187 | { "txt", TASK_FULLSCRAPE_TPB_ASCII }, { NULL, -3 } }; | 187 | { "txt", TASK_FULLSCRAPE_TPB_ASCII }, { "txtp", TASK_FULLSCRAPE_TPB_ASCII_PLUS }, { NULL, -3 } }; |
188 | 188 | ||
189 | int mode = TASK_STATS_PEERS, scanon = 1, format = 0; | 189 | int mode = TASK_STATS_PEERS, scanon = 1, format = 0; |
190 | 190 | ||
@@ -47,8 +47,9 @@ typedef enum { | |||
47 | TASK_FULLSCRAPE = 0x0200, /* Default mode */ | 47 | TASK_FULLSCRAPE = 0x0200, /* Default mode */ |
48 | TASK_FULLSCRAPE_TPB_BINARY = 0x0201, | 48 | TASK_FULLSCRAPE_TPB_BINARY = 0x0201, |
49 | TASK_FULLSCRAPE_TPB_ASCII = 0x0202, | 49 | TASK_FULLSCRAPE_TPB_ASCII = 0x0202, |
50 | TASK_FULLSCRAPE_TPB_URLENCODED = 0x0203, | 50 | TASK_FULLSCRAPE_TPB_ASCII_PLUS = 0x0203, |
51 | TASK_FULLSCRAPE_TRACKERSTATE = 0x0204, | 51 | TASK_FULLSCRAPE_TPB_URLENCODED = 0x0204, |
52 | TASK_FULLSCRAPE_TRACKERSTATE = 0x0205, | ||
52 | 53 | ||
53 | TASK_DMEM = 0x0300, | 54 | TASK_DMEM = 0x0300, |
54 | 55 | ||