From 2a94892890074e1090eb60b2e1b3273df9c7d899 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Tue, 16 Jun 2009 12:17:53 +0000 Subject: Display v4 addresses in v4 mode nicer --- opentracker.c | 2 +- ot_accesslist.c | 2 +- ot_stats.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opentracker.c b/opentracker.c index 6699164..e2e48f2 100644 --- a/opentracker.c +++ b/opentracker.c @@ -257,7 +257,7 @@ static int64_t ot_try_bind( ot_ip6 ip, uint16_t port, PROTO_FLAG proto ) { char *protos[] = {"TCP","UDP","UDP mcast"}; char _debug[512]; int off = snprintf( _debug, sizeof(_debug), "Binding socket type %s to address [", protos[proto] ); - off += fmt_ip6( _debug+off, ip); + off += fmt_ip6c( _debug+off, ip); snprintf( _debug + off, sizeof(_debug)-off, "]:%d...", port); fputs( _debug, stderr ); #endif diff --git a/ot_accesslist.c b/ot_accesslist.c index b69035e..6ef7114 100644 --- a/ot_accesslist.c +++ b/ot_accesslist.c @@ -119,7 +119,7 @@ int accesslist_blessip( ot_ip6 ip, ot_permissions permissions ) { { char _debug[512]; int off = snprintf( _debug, sizeof(_debug), "Blessing ip address " ); - off += fmt_ip6(_debug+off, ip ); + off += fmt_ip6c(_debug+off, ip ); if( permissions & OT_PERMISSION_MAY_STAT ) off += snprintf( _debug+off, 512-off, " may_fetch_stats" ); if( permissions & OT_PERMISSION_MAY_LIVESYNC ) off += snprintf( _debug+off, 512-off, " may_sync_live" ); diff --git a/ot_stats.c b/ot_stats.c index 8192d27..2e745a4 100644 --- a/ot_stats.c +++ b/ot_stats.c @@ -603,7 +603,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event ot_ip6 *ip = (ot_ip6*)event_data; /* ugly hack to transfer ip to stats */ char _debug[512]; int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 ); - off += fmt_ip6( _debug+off, *ip ); + off += fmt_ip6c( _debug+off, *ip ); off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" ); write( 2, _debug, off ); ot_full_scrape_request_count++; @@ -614,7 +614,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event ot_ip6 *ip = (ot_ip6*)event_data; /* ugly hack to transfer ip to stats */ char _debug[512]; int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 ); - off += fmt_ip6(_debug+off, *ip ); + off += fmt_ip6c(_debug+off, *ip ); off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" ); write( 2, _debug, off ); ot_full_scrape_request_count++; -- cgit v1.2.3