From ab95abb6bde0073ebb869624332adf028aac8dd7 Mon Sep 17 00:00:00 2001 From: faketruth Date: Sun, 5 Feb 2012 16:24:16 +0000 Subject: Now showing proper error messages when sockets fail :) Crossplatform GetLastError function in cSocket git-svn-id: http://mc-server.googlecode.com/svn/trunk@234 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cBlockingTCPLink.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/cBlockingTCPLink.cpp') diff --git a/source/cBlockingTCPLink.cpp b/source/cBlockingTCPLink.cpp index 1145e0e56..5a36536bc 100644 --- a/source/cBlockingTCPLink.cpp +++ b/source/cBlockingTCPLink.cpp @@ -84,7 +84,7 @@ bool cBlockingTCPLink::Connect(const char * iAddress, unsigned int iPort) server.sin_port = htons( (unsigned short)iPort); if (connect(m_Socket, (struct sockaddr *)&server, sizeof(server))) { - LOGWARN("cTCPLink: Connection to \"%s:%d\" failed (%s)", iAddress, iPort, m_Socket.GetLastErrorString()); + LOGWARN("cTCPLink: Connection to \"%s:%d\" failed (%s)", iAddress, iPort, cSocket::GetErrorString( cSocket::GetLastError() ).c_str() ); CloseSocket(); return false; } -- cgit v1.2.3