From: Matze B. <mat...@us...> - 2002-06-24 13:59:39
|
Update of /cvsroot/planeshift/gnl/src In directory usw-pr-cvs1:/tmp/cvs-serv4807/src Modified Files: message.cpp sockwinerror.inc Log Message: fixed several issues on win, but still it doesn't resolve hostnames correctly :-/ Index: message.cpp =================================================================== RCS file: /cvsroot/planeshift/gnl/src/message.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** message.cpp 18 Jun 2002 20:28:01 -0000 1.2 --- message.cpp 24 Jun 2002 13:59:35 -0000 1.3 *************** *** 1,4 **** #include <malloc.h> ! #include <assert.h> #include "gnl/message.h" --- 1,4 ---- #include <malloc.h> ! #include <cassert> #include "gnl/message.h" Index: sockwinerror.inc =================================================================== RCS file: /cvsroot/planeshift/gnl/src/sockwinerror.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sockwinerror.inc 17 Jun 2002 10:20:10 -0000 1.1 --- sockwinerror.inc 24 Jun 2002 13:59:35 -0000 1.2 *************** *** 7,26 **** const char* Socket::GetCommonError (int rc) const { ! return "Unknown error code in socket layer."; } const char* Socket::GetSendtoError (int rc) const { ! return "Error in Sending out packet."; } const char* Socket::GetRecvFromError (int rc) const { ! return "Error in receiving packet."; } const char* Socket::GetBindError (int rc) const { ! return "bind failed."; } --- 7,48 ---- const char* Socket::GetCommonError (int rc) const { ! switch (rc) ! { ! case WSAEINTR: ! return "socket call interrupted. (WSAEINTR)"; ! case WSAEBADF: ! return "bad file descriptor. (WSAEBADF)"; ! case WSAEACCES: ! return "no permission. (WSAEACCES)"; ! case WSAEINVAL: ! return "invalid argument. (WSAEINVAL)"; ! case WSAEMFILE: ! return "WSAEMFILE. (WSAEMFILE)"; ! case WSAEWOULDBLOCK: ! return "operation would block. (WSAWOULDBLOCK)"; ! case WSAEINPROGRESS: ! return "socket budy. (WSAEINPROGRESS)"; ! case WSAEALREADY: ! return "WSEALREADY"; ! case WSAENOTSOCK: ! return "operation on non socket desciptor. (WSAENOTSOCK)"; ! default: ! return "unknown socket error"; ! } } const char* Socket::GetSendtoError (int rc) const { ! return GetCommonError(rc); } const char* Socket::GetRecvFromError (int rc) const { ! return GetCommonError(rc); } const char* Socket::GetBindError (int rc) const { ! return GetCommonError(rc); } |