summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2009-06-16 12:17:53 +0000
committererdgeist <>2009-06-16 12:17:53 +0000
commit2a94892890074e1090eb60b2e1b3273df9c7d899 (patch)
treed9f4735b35b2294195f446c64b1968bc1309aa41
parent6c19143bc1279889ded58df7ee4ab9f452d58bfa (diff)
Display v4 addresses in v4 mode nicer
-rw-r--r--opentracker.c2
-rw-r--r--ot_accesslist.c2
-rw-r--r--ot_stats.c4
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 ) {
257 char *protos[] = {"TCP","UDP","UDP mcast"}; 257 char *protos[] = {"TCP","UDP","UDP mcast"};
258 char _debug[512]; 258 char _debug[512];
259 int off = snprintf( _debug, sizeof(_debug), "Binding socket type %s to address [", protos[proto] ); 259 int off = snprintf( _debug, sizeof(_debug), "Binding socket type %s to address [", protos[proto] );
260 off += fmt_ip6( _debug+off, ip); 260 off += fmt_ip6c( _debug+off, ip);
261 snprintf( _debug + off, sizeof(_debug)-off, "]:%d...", port); 261 snprintf( _debug + off, sizeof(_debug)-off, "]:%d...", port);
262 fputs( _debug, stderr ); 262 fputs( _debug, stderr );
263#endif 263#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 ) {
119 { 119 {
120 char _debug[512]; 120 char _debug[512];
121 int off = snprintf( _debug, sizeof(_debug), "Blessing ip address " ); 121 int off = snprintf( _debug, sizeof(_debug), "Blessing ip address " );
122 off += fmt_ip6(_debug+off, ip ); 122 off += fmt_ip6c(_debug+off, ip );
123 123
124 if( permissions & OT_PERMISSION_MAY_STAT ) off += snprintf( _debug+off, 512-off, " may_fetch_stats" ); 124 if( permissions & OT_PERMISSION_MAY_STAT ) off += snprintf( _debug+off, 512-off, " may_fetch_stats" );
125 if( permissions & OT_PERMISSION_MAY_LIVESYNC ) off += snprintf( _debug+off, 512-off, " may_sync_live" ); 125 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
603 ot_ip6 *ip = (ot_ip6*)event_data; /* ugly hack to transfer ip to stats */ 603 ot_ip6 *ip = (ot_ip6*)event_data; /* ugly hack to transfer ip to stats */
604 char _debug[512]; 604 char _debug[512];
605 int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 ); 605 int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 );
606 off += fmt_ip6( _debug+off, *ip ); 606 off += fmt_ip6c( _debug+off, *ip );
607 off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" ); 607 off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" );
608 write( 2, _debug, off ); 608 write( 2, _debug, off );
609 ot_full_scrape_request_count++; 609 ot_full_scrape_request_count++;
@@ -614,7 +614,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event
614 ot_ip6 *ip = (ot_ip6*)event_data; /* ugly hack to transfer ip to stats */ 614 ot_ip6 *ip = (ot_ip6*)event_data; /* ugly hack to transfer ip to stats */
615 char _debug[512]; 615 char _debug[512];
616 int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 ); 616 int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 );
617 off += fmt_ip6(_debug+off, *ip ); 617 off += fmt_ip6c(_debug+off, *ip );
618 off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" ); 618 off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" );
619 write( 2, _debug, off ); 619 write( 2, _debug, off );
620 ot_full_scrape_request_count++; 620 ot_full_scrape_request_count++;