mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
Csocket again
<@x-x> psychon: merge new csocket :> git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@866 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+5
-5
@@ -28,7 +28,7 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* $Revision: 1.60 $
|
||||
* $Revision: 1.61 $
|
||||
*/
|
||||
|
||||
#include "Csocket.h"
|
||||
@@ -390,17 +390,17 @@ void SSLErrors( const char *filename, u_int iLineNum )
|
||||
}
|
||||
#endif /* HAVE_LIBSSL */
|
||||
|
||||
void __Perror( const CS_STRING & s )
|
||||
void __Perror( const CS_STRING & s, const char *pszFile, unsigned int iLineNo )
|
||||
{
|
||||
#if defined(__sun) || defined(_WIN32) || __NetBSD_Version__ < 4000000000
|
||||
CS_DEBUG( s << ": " << strerror( GetSockError() ) );
|
||||
std::cerr << s << "(" << pszFile << ":" << iLineNo << "): " << strerror( GetSockError() ) << endl;
|
||||
#else
|
||||
char buff[512];
|
||||
memset( (char *)buff, '\0', 512 );
|
||||
if ( strerror_r( GetSockError(), buff, 511 ) == 0 )
|
||||
CS_DEBUG( s << ": " << buff );
|
||||
std::cerr << s << "(" << pszFile << ":" << iLineNo << "): " << buff << endl;
|
||||
else
|
||||
CS_DEBUG( s << ": Unknown Error Occured" );
|
||||
std::cerr << s << "(" << pszFile << ":" << iLineNo << "): Unknown Error Occured " << endl;
|
||||
#endif /* __sun */
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* $Revision: 1.177 $
|
||||
* $Revision: 1.178 $
|
||||
*/
|
||||
|
||||
// note to compile with win32 need to link to winsock2, using gcc its -lws2_32
|
||||
@@ -102,7 +102,7 @@
|
||||
#endif /* CS_DEBUG */
|
||||
|
||||
#ifdef __DEBUG__
|
||||
# define PERROR( f ) __Perror( f )
|
||||
# define PERROR( f ) __Perror( f, __FILE__, __LINE__ )
|
||||
#else
|
||||
# define PERROR( f ) (void)0
|
||||
#endif /* __DEBUG__ */
|
||||
@@ -377,7 +377,7 @@ inline void TFD_CLR( u_int iSock, fd_set *set )
|
||||
FD_CLR( iSock, set );
|
||||
}
|
||||
|
||||
void __Perror( const CS_STRING & s );
|
||||
void __Perror( const CS_STRING & s, const char *pszFile, unsigned int iLineNo );
|
||||
unsigned long long millitime();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user