summaryrefslogtreecommitdiff
path: root/ot_stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_stats.c')
-rw-r--r--ot_stats.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ot_stats.c b/ot_stats.c
index b3cc48a..2d45346 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -73,13 +73,13 @@ static time_t ot_start_time;
73#define __LDR(P,D) ((__BYTE((P),(D))>>__SHFT((D)))&__MSK) 73#define __LDR(P,D) ((__BYTE((P),(D))>>__SHFT((D)))&__MSK)
74#define __STR(P,D,V) __BYTE((P),(D))=(__BYTE((P),(D))&~(__MSK<<__SHFT((D))))|((V)<<__SHFT((D))) 74#define __STR(P,D,V) __BYTE((P),(D))=(__BYTE((P),(D))&~(__MSK<<__SHFT((D))))|((V)<<__SHFT((D)))
75 75
76//#ifdef WANT_V6 76#if 0
77//#define STATS_NETWORK_NODE_MAXDEPTH (68-STATS_NETWORK_NODE_BITWIDTH) 77// XXX
78//#define STATS_NETWORK_NODE_LIMIT (48-STATS_NETWORK_NODE_BITWIDTH) 78#define STATS_NETWORK_NODE_MAXDEPTH (68-STATS_NETWORK_NODE_BITWIDTH)
79//#else 79#define STATS_NETWORK_NODE_LIMIT (48-STATS_NETWORK_NODE_BITWIDTH)
80#endif
80#define STATS_NETWORK_NODE_MAXDEPTH (28-STATS_NETWORK_NODE_BITWIDTH) 81#define STATS_NETWORK_NODE_MAXDEPTH (28-STATS_NETWORK_NODE_BITWIDTH)
81#define STATS_NETWORK_NODE_LIMIT (24-STATS_NETWORK_NODE_BITWIDTH) 82#define STATS_NETWORK_NODE_LIMIT (24-STATS_NETWORK_NODE_BITWIDTH)
82//#endif
83 83
84typedef union stats_network_node stats_network_node; 84typedef union stats_network_node stats_network_node;
85union stats_network_node { 85union stats_network_node {
@@ -202,9 +202,10 @@ static size_t stats_return_busy_networks( char * reply, stats_network_node *tree
202 for( i=amount-1; i>=0; --i) { 202 for( i=amount-1; i>=0; --i) {
203 if( scores[i] ) { 203 if( scores[i] ) {
204 r += sprintf( r, "%08zd: ", scores[i] ); 204 r += sprintf( r, "%08zd: ", scores[i] );
205#ifdef WANT_V6 205//#ifdef WANT_V6
206 r += fmt_ip6c( r, networks[i] ); 206 r += fmt_ip6c( r, networks[i] );
207#else 207#if 0
208 // XXX
208 r += fmt_ip4( r, networks[i]); 209 r += fmt_ip4( r, networks[i]);
209#endif 210#endif
210 *r++ = '\n'; 211 *r++ = '\n';
@@ -675,9 +676,9 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event
675 *peerid_hex=0; 676 *peerid_hex=0;
676 } 677 }
677 678
678#ifdef WANT_V6
679 ip_readable[ fmt_ip6c( ip_readable, (char*)&ws->peer ) ] = 0; 679 ip_readable[ fmt_ip6c( ip_readable, (char*)&ws->peer ) ] = 0;
680#else 680#if 0
681 /* XXX */
681 ip_readable[ fmt_ip4( ip_readable, (char*)&ws->peer ) ] = 0; 682 ip_readable[ fmt_ip4( ip_readable, (char*)&ws->peer ) ] = 0;
682#endif 683#endif
683 syslog( LOG_INFO, "time=%s event=completed info_hash=%s peer_id=%s ip=%s", timestring, hash_hex, peerid_hex, ip_readable ); 684 syslog( LOG_INFO, "time=%s event=completed info_hash=%s peer_id=%s ip=%s", timestring, hash_hex, peerid_hex, ip_readable );