diff options
author | erdgeist <> | 2008-10-17 15:21:11 +0000 |
---|---|---|
committer | erdgeist <> | 2008-10-17 15:21:11 +0000 |
commit | f4283be67732c2edce701762d871cf7b8495dd4a (patch) | |
tree | d54c3b6f68f3d00dfceda7367cccf7d76787eb5a /ot_stats.c | |
parent | 0deb06d5442d4d65cf4251428d5977396cfbf023 (diff) |
Fix debug output for addresses >127
Diffstat (limited to 'ot_stats.c')
-rw-r--r-- | ot_stats.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -512,14 +512,14 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uint32_t event_ | |||
512 | break; | 512 | break; |
513 | case EVENT_FULLSCRAPE_REQUEST: | 513 | case EVENT_FULLSCRAPE_REQUEST: |
514 | { | 514 | { |
515 | unsigned char ip[4]; *(int*)ip = (int)proto; /* ugly hack to transfer ip to stats */ | 515 | uint8_t ip[4]; *(uint32_t*)ip = (uint32_t)proto; /* ugly hack to transfer ip to stats */ |
516 | 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] ); | 516 | 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] ); |
517 | ot_full_scrape_request_count++; | 517 | ot_full_scrape_request_count++; |
518 | } | 518 | } |
519 | break; | 519 | break; |
520 | case EVENT_FULLSCRAPE_REQUEST_GZIP: | 520 | case EVENT_FULLSCRAPE_REQUEST_GZIP: |
521 | { | 521 | { |
522 | unsigned char ip[4]; *(int*)ip = (int)proto; /* ugly hack to transfer ip to stats */ | 522 | uint8_t ip[4]; *(uint32_t*)ip = (uint32_t)proto; /* ugly hack to transfer ip to stats */ |
523 | 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] ); | 523 | 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] ); |
524 | ot_full_scrape_request_count++; | 524 | ot_full_scrape_request_count++; |
525 | } | 525 | } |