summaryrefslogtreecommitdiff
path: root/ot_stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_stats.c')
-rw-r--r--ot_stats.c4
1 files changed, 2 insertions, 2 deletions
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_
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 }