Pulled in changes for resolving ipv6 hosts

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@636 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2006-02-10 22:45:44 +00:00
parent f657ac6b05
commit 4662987fc0
+2 -3
View File
@@ -56,8 +56,7 @@ int GetHostByName6( const CS_STRING & sHostName, in6_addr * paddr, u_int iNumRet
for( u_int a = 0; a < iNumRetries; a++ )
{
memset( (char *)hbuff, '\0', 2048 );
iReturn = gethostbyname_r( sHostName.c_str(), &hentbuff, hbuff, 2048, &hent, &err );
iReturn = gethostbyname2_r( sHostName.c_str(), AF_INET6, &hentbuff, hbuff, 2048, &hent, &err );
if ( iReturn == 0 )
break;
@@ -69,7 +68,7 @@ int GetHostByName6( const CS_STRING & sHostName, in6_addr * paddr, u_int iNumRet
if ( ( !hent ) && ( iReturn == 0 ) )
iReturn = HOST_NOT_FOUND;
#else
hent = gethostbyname( sHostName.c_str() );
hent = gethostbyname2( sHostName.c_str(), AF_INET6 );
PERROR( "gethostbyname" );
if ( hent )