mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
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:
+2
-3
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user