# HG changeset patch # User attila # Date 1277062158 0 # Node ID 1bd9030016292e6d538b4de82e9219398f538664 # Parent 29c120a9caad23f3512b87c5e650c24fe28c61c9 Prefere the use of inet_ntop over inet_ntoa, as the former is ipv6 safe. This fixes bug #1491 diff -r 29c120a9caad -r 1bd903001629 stream/tcp.c --- a/stream/tcp.c Sun Jun 20 19:26:57 2010 +0000 +++ b/stream/tcp.c Sun Jun 20 19:29:18 2010 +0000 @@ -187,10 +187,10 @@ return TCP_ERROR_FATAL; } -#if HAVE_INET_ATON || defined(HAVE_WINSOCK2_H) +#if HAVE_INET_PTON + inet_ntop(af, our_s_addr, buf, 255); +#elif HAVE_INET_ATON || defined(HAVE_WINSOCK2_H) av_strlcpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); -#else - inet_ntop(af, our_s_addr, buf, 255); #endif if(verb) mp_msg(MSGT_NETWORK,MSGL_STATUS,MSGTR_MPDEMUX_NW_ConnectingToServer, host, buf , port );