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
This commit is contained in:
@@ -179,7 +179,7 @@ bool cServer::InitServer( int a_Port )
|
||||
|
||||
if( !m_pState->SListenClient.IsValid() )
|
||||
{
|
||||
LOGERROR("m_SListenClient==INVALID_SOCKET (%s)", cSocket::GetLastErrorString() );
|
||||
LOGERROR("m_SListenClient==INVALID_SOCKET (%s)", cSocket::GetErrorString( cSocket::GetLastError() ).c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -196,13 +196,13 @@ bool cServer::InitServer( int a_Port )
|
||||
|
||||
if( m_pState->SListenClient.Bind( local ) != 0 )
|
||||
{
|
||||
LOGERROR("bind fail (%s)", cSocket::GetLastErrorString() );
|
||||
LOGERROR("bind fail (%s)", cSocket::GetErrorString( cSocket::GetLastError() ).c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_pState->SListenClient.Listen( 10 ) != 0)
|
||||
{
|
||||
LOGERROR("listen fail (%s)", cSocket::GetLastErrorString() );
|
||||
LOGERROR("listen fail (%s)", cSocket::GetErrorString( cSocket::GetLastError() ).c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user