From 0bfab763d8401983edf40fe8421e3f68ef337dad Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Tue, 4 Dec 2007 23:04:24 +0000 Subject: print ip addresses from unsigned chars --- 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 717e943..e682599 100644 --- a/ot_stats.c +++ b/ot_stats.c @@ -306,14 +306,14 @@ void stats_issue_event( ot_status_event event, int is_tcp, size_t event_data ) { break; case EVENT_FULLSCRAPE_REQUEST: { - char ip[4]; *(int*)ip = is_tcp; /* ugly hack to transfer ip to stats */ + unsigned char ip[4]; *(int*)ip = is_tcp; /* 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: { - char ip[4]; *(int*)ip = is_tcp; /* ugly hack to transfer ip to stats */ + unsigned char ip[4]; *(int*)ip = is_tcp; /* 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