From d1e6e4486c14e56da665c5690844ef5f2e893f0a Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 28 Apr 2017 15:42:17 +0200 Subject: incorporate a more verbose ascii dump, provided by Tom --- ot_fullscrape.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ot_fullscrape.c') 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 to_hex( r, *hash ); r+= 2 * sizeof(ot_hash); r += sprintf( r, ":%zd:%zd\n", peer_list->seed_count, peer_list->peer_count-peer_list->seed_count ); break; + case TASK_FULLSCRAPE_TPB_ASCII_PLUS: + to_hex( r, *hash ); r+= 2 * sizeof(ot_hash); + r += sprintf( r, ":%zd:%zd:%zd\n", peer_list->seed_count, peer_list->peer_count-peer_list->seed_count, peer_list->down_count ); + break; case TASK_FULLSCRAPE_TPB_BINARY: memcpy( r, *hash, sizeof(ot_hash) ); r += sizeof(ot_hash); *(uint32_t*)(r+0) = htonl( (uint32_t) peer_list->seed_count ); -- cgit v1.2.3