wasn't being to smart here, not totally portable when specifying IPPROTO_IP, use the protocol pass in for best portability

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@996 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
imaginos
2008-03-31 02:37:34 +00:00
parent fc191e4908
commit 3933f807df
+1 -1
View File
@@ -212,7 +212,7 @@ int GetAddrInfo( const CS_STRING & sHostname, Csock *pSock, CSSockAddr & csSockA
// this is a quick check to see if we can connect to this type of outside port (ipv6 or ipv4)
// this doesn't do an actual connection (man connect), but its a great way to validate a possible connection canidate
bool bContinue = false;
int iTestFD = socket( pRes->ai_family, SOCK_DGRAM, IPPROTO_IP );
int iTestFD = socket( pRes->ai_family, SOCK_DGRAM, pRes->ai_protocol );
if( iTestFD >= 0 )
{
if( connect( iTestFD, pRes->ai_addr, pRes->ai_addrlen ) != 0 )