From f4283be67732c2edce701762d871cf7b8495dd4a Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 17 Oct 2008 15:21:11 +0000 Subject: Fix debug output for addresses >127 --- opentracker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index 2a746cf..fa63378 100644 --- a/opentracker.c +++ b/opentracker.c @@ -237,7 +237,8 @@ static int64_t ot_try_bind( char ip[4], uint16_t port, PROTO_FLAG proto ) { #ifdef _DEBUG char *protos[] = {"TCP","UDP","UDP mcast"}; - fprintf( stderr, "Binding socket type %s to address %d.%d.%d.%d:%d...", protos[proto],(int)ip[0],(int)ip[1],(int)ip[2],(int)ip[3],port); + uint8_t *_ip = (uint8_t *)ip; + fprintf( stderr, "Binding socket type %s to address %d.%d.%d.%d:%d...", protos[proto],_ip[0],_ip[1],_ip[2],_ip[3],port); #endif if( socket_bind4_reuse( s, ip, port ) == -1 ) -- cgit v1.2.3