From f4283be67732c2edce701762d871cf7b8495dd4a Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 17 Oct 2008 15:21:11 +0000 Subject: Fix debug output for addresses >127 --- ot_stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ot_stats.c') diff --git a/ot_stats.c b/ot_stats.c index cc7dc30..8810151 100644 --- a/ot_stats.c +++ b/ot_stats.c @@ -512,14 +512,14 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uint32_t event_ break; case EVENT_FULLSCRAPE_REQUEST: { - unsigned char ip[4]; *(int*)ip = (int)proto; /* ugly hack to transfer ip to stats */ + uint8_t ip[4]; *(uint32_t*)ip = (uint32_t)proto; /* ugly hack to transfer ip to stats */ LOG_TO_STDERR( "[%08d] scrp: %d.%d.%d.%d - FULL SCRAPE\n", (unsigned int)(g_now - ot_start_time), ip[0], ip[1], ip[2], ip[3] ); ot_full_scrape_request_count++; } break; case EVENT_FULLSCRAPE_REQUEST_GZIP: { - unsigned char ip[4]; *(int*)ip = (int)proto; /* ugly hack to transfer ip to stats */ + uint8_t ip[4]; *(uint32_t*)ip = (uint32_t)proto; /* ugly hack to transfer ip to stats */ LOG_TO_STDERR( "[%08d] scrp: %d.%d.%d.%d - FULL SCRAPE GZIP\n", (unsigned int)(g_now - ot_start_time), ip[0], ip[1], ip[2], ip[3] ); ot_full_scrape_request_count++; } -- cgit v1.2.3