From 9a2e17c65712c162f18e23510749cec4e1726318 Mon Sep 17 00:00:00 2001 From: psychon Date: Wed, 25 Mar 2009 15:38:11 +0000 Subject: [PATCH] Update to latest Csocket git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1444 726aef4b-f618-498e-8847-2d620e286838 --- Csocket.cpp | 11 +++++------ Csocket.h | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Csocket.cpp b/Csocket.cpp index e8080305..893c0302 100644 --- a/Csocket.cpp +++ b/Csocket.cpp @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 1999-2007 Jim Hull +* Copyright (c) 1999-2009 Jim Hull * All rights reserved * * Redistribution and use in source and binary forms, with or without modification, @@ -28,7 +28,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * -* $Revision: 1.95 $ +* $Revision: 1.97 $ */ #include "Csocket.h" @@ -397,7 +397,7 @@ void SSLErrors( const char *filename, u_int iLineNum ) void __Perror( const CS_STRING & s, const char *pszFile, unsigned int iLineNo ) { -#if defined(__sun) || defined(_WIN32) || __NetBSD_Version__ < 4000000000 +#if defined(__sun) || defined(_WIN32) || (defined(__NetBSD_Version__) && __NetBSD_Version__ < 4000000000) std::cerr << s << "(" << pszFile << ":" << iLineNo << "): " << strerror( GetSockError() ) << endl; #else char buff[512]; @@ -1268,10 +1268,9 @@ bool Csock::Write( const char *data, int len ) // to keep openssl from spinning, just initiate the connection with 1 byte so the connection establishes faster iBytesToSend = 1; } - else if ( ( m_iMaxBytes > 0 ) && ( m_iMaxMilliSeconds > 0 ) ) -#else - if ( ( m_iMaxBytes > 0 ) && ( m_iMaxMilliSeconds > 0 ) ) + else #endif /* HAVE_LIBSSL */ + if ( ( m_iMaxBytes > 0 ) && ( m_iMaxMilliSeconds > 0 ) ) { unsigned long long iNOW = millitime(); // figure out the shaping here diff --git a/Csocket.h b/Csocket.h index 0df714e2..8c8e4c94 100644 --- a/Csocket.h +++ b/Csocket.h @@ -1,6 +1,6 @@ /** * -* Copyright (c) 1999-2007 Jim Hull +* Copyright (c) 1999-2009 Jim Hull * All rights reserved * * Redistribution and use in source and binary forms, with or without modification, @@ -28,7 +28,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * -* $Revision: 1.203 $ +* $Revision: 1.205 $ */ // note to compile with win32 need to link to winsock2, using gcc its -lws2_32