Also disable avatar retrieval on server. Fixed nasty send "wrong return value" (Linux only).
This commit is contained in:
@@ -248,7 +248,7 @@ ClientStateStartConnect::Process(ClientThread &client)
|
||||
else
|
||||
{
|
||||
int errCode = SOCKET_ERRNO();
|
||||
if (errCode == SOCKET_ERR_WOULDBLOCK)
|
||||
if (IS_SOCKET_ERR_WOULDBLOCK(errCode))
|
||||
{
|
||||
boost::timers::portable::microsec_timer connectTimer;
|
||||
ClientStateConnecting::Instance().SetTimer(connectTimer);
|
||||
|
||||
@@ -66,7 +66,7 @@ ReceiverHelper::Recv(SOCKET sock, ReceiveBuffer &buf)
|
||||
if (!IS_VALID_RECV(bytesRecvd))
|
||||
{
|
||||
int errCode = SOCKET_ERRNO();
|
||||
if (errCode != SOCKET_ERR_WOULDBLOCK)
|
||||
if (!IS_SOCKET_ERR_WOULDBLOCK(errCode))
|
||||
throw NetException(__FILE__, __LINE__, ERR_SOCK_RECV_FAILED, SOCKET_ERRNO());
|
||||
}
|
||||
else if (bytesRecvd == 0)
|
||||
|
||||
@@ -178,7 +178,7 @@ SenderThread::Main()
|
||||
{
|
||||
// Never assume that this is a fatal error.
|
||||
int errCode = SOCKET_ERRNO();
|
||||
if (errCode == SOCKET_ERR_WOULDBLOCK)
|
||||
if (IS_SOCKET_ERR_WOULDBLOCK(errCode))
|
||||
{
|
||||
fd_set writeSet;
|
||||
struct timeval timeout;
|
||||
@@ -193,7 +193,7 @@ SenderThread::Main()
|
||||
{
|
||||
// Never assume that this is a fatal error.
|
||||
int errCode = SOCKET_ERRNO();
|
||||
if (errCode != SOCKET_ERR_WOULDBLOCK)
|
||||
if (!IS_SOCKET_ERR_WOULDBLOCK(errCode))
|
||||
{
|
||||
// Skip this packet - this is bad, and is therefore reported.
|
||||
// Ignore invalid or not connected sockets.
|
||||
|
||||
@@ -387,9 +387,9 @@ ServerLobbyThread::HandleNetPacketInit(SessionWrapper session, const NetPacketIn
|
||||
m_sessionManager.SetSessionPlayerData(session.sessionData->GetId(), tmpPlayerData);
|
||||
session.playerData = tmpPlayerData;
|
||||
|
||||
if (initData.showAvatar && !GetAvatarManager().HasAvatar(initData.avatar))
|
||||
RequestPlayerAvatar(session);
|
||||
else
|
||||
// if (initData.showAvatar && !GetAvatarManager().HasAvatar(initData.avatar))
|
||||
// RequestPlayerAvatar(session);
|
||||
// else
|
||||
EstablishSession(session);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user