From fd90be44f20861867cedb43947cb8fc548853eae Mon Sep 17 00:00:00 2001 From: prozacx Date: Thu, 9 Feb 2006 04:32:42 +0000 Subject: [PATCH] Pulled in changes with a few bugfixes git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@629 726aef4b-f618-498e-8847-2d620e286838 --- Csocket.cpp | 2 +- Csocket.h | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Csocket.cpp b/Csocket.cpp index a4a1243c..18a82ce4 100644 --- a/Csocket.cpp +++ b/Csocket.cpp @@ -1849,7 +1849,7 @@ int Csock::DNSLookup( EDNSLType eDNSLType ) return( EAGAIN ); #else - int iRet; + int iRet = ETIMEDOUT; if ( eDNSLType == DNS_VHOST ) { if( !GetIPv6() ) diff --git a/Csocket.h b/Csocket.h index f4fd3e00..077e8c23 100644 --- a/Csocket.h +++ b/Csocket.h @@ -154,7 +154,18 @@ public: m_saddr.sin_port = htons( iPort ); } - void SetIPv6( bool b ) { m_bIsIPv6 = b; } + void SetIPv6( bool b ) + { +#ifndef HAVE_IPV6 + if( b ) + { + CS_DEBUG( "-DHAVE_IPV6 must be set during compile time to enable this feature" ); + m_bIsIPv6 = false; + return; + } +#endif /* HAVE_IPV6 */ + m_bIsIPv6 = b; + } bool GetIPv6() const { return( m_bIsIPv6 ); }