mirror of
https://github.com/znc/znc.git
synced 2026-07-04 17:01:23 +02:00
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:
+1
-1
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user