[MPlayer-cvslog] r31498 - trunk/stream/tcp.c
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Mon Jun 21 18:04:28 CEST 2010
On Sun, Jun 20, 2010 at 09:29:18PM +0200, attila wrote:
> Author: attila
> Date: Sun Jun 20 21:29:18 2010
> New Revision: 31498
>
> Log:
> Prefere the use of inet_ntop over inet_ntoa, as the former is ipv6 safe.
> This fixes bug #1491
>
> Modified:
> trunk/stream/tcp.c
>
> Modified: trunk/stream/tcp.c
> ==============================================================================
> --- trunk/stream/tcp.c Sun Jun 20 21:26:57 2010 (r31497)
> +++ trunk/stream/tcp.c Sun Jun 20 21:29:18 2010 (r31498)
> @@ -187,10 +187,10 @@ connect2Server_with_af(char *host, int p
> return TCP_ERROR_FATAL;
> }
>
> -#if HAVE_INET_ATON || defined(HAVE_WINSOCK2_H)
> - av_strlcpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255);
> -#else
> +#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);
> #endif
This will change the behaviour with winsocks if pton is available.
Is this intentional/likely to work right?
I suspect it is "doubly" ok, but maybe have a quick look anyway.
More information about the MPlayer-cvslog
mailing list