Commit 1492c3f2 authored by Gildas Bazin's avatar Gildas Bazin

* modules/misc/network/ipv6.c: fix for ipv6 name resolution, courtesy of Jeroen Massar (jeroen at unfix dot org).
parent 56ebc459
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ipv6.c: IPv6 network abstraction layer * ipv6.c: IPv6 network abstraction layer
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: ipv6.c,v 1.15 2004/01/25 17:20:19 kuehne Exp $ * $Id: ipv6.c,v 1.16 2004/02/15 22:20:56 gbazin Exp $
* *
* Authors: Alexis Guillard <alexis.guillard@bt.com> * Authors: Alexis Guillard <alexis.guillard@bt.com>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -165,9 +165,8 @@ static int BuildAddr( vlc_object_t * p_this, struct sockaddr_in6 * p_socket, ...@@ -165,9 +165,8 @@ static int BuildAddr( vlc_object_t * p_this, struct sockaddr_in6 * p_socket,
#else #else
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6; hints.ai_family = AF_INET6;
hints.ai_flags = AI_NUMERICHOST;
if( _getaddrinfo( psz_address, NULL, &hints, &res ) ) if( _getaddrinfo( psz_address, NULL, &hints, &res ) != 0 )
{ {
FreeLibrary( wship6_dll ); FreeLibrary( wship6_dll );
free( psz_backup ); free( psz_backup );
...@@ -198,7 +197,10 @@ static int BuildAddr( vlc_object_t * p_this, struct sockaddr_in6 * p_socket, ...@@ -198,7 +197,10 @@ static int BuildAddr( vlc_object_t * p_this, struct sockaddr_in6 * p_socket,
p_hostent->h_length ); p_hostent->h_length );
#elif defined(WIN32) #elif defined(WIN32)
if( _getaddrinfo( psz_address, NULL, &hints, &res ) ) memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
if( _getaddrinfo( psz_address, NULL, &hints, &res ) != 0 )
{ {
FreeLibrary( wship6_dll ); FreeLibrary( wship6_dll );
free( psz_backup ); free( psz_backup );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment