mirror of
git://erdgeist.org/opentracker
synced 2025-02-05 11:36:24 +00:00
print ip addresses from unsigned chars
This commit is contained in:
parent
362a0e052a
commit
0bfab763d8
@ -306,14 +306,14 @@ void stats_issue_event( ot_status_event event, int is_tcp, size_t event_data ) {
|
|||||||
break;
|
break;
|
||||||
case EVENT_FULLSCRAPE_REQUEST:
|
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] );
|
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++;
|
ot_full_scrape_request_count++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EVENT_FULLSCRAPE_REQUEST_GZIP:
|
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] );
|
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++;
|
ot_full_scrape_request_count++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user