diff options
author | Subv <subv2112@gmail.com> | 2014-07-07 14:25:17 -0500 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2014-07-07 14:25:17 -0500 |
commit | 110396447f2f414f8834c1b86c764d97704537b7 (patch) | |
tree | 177f9dc0f504e0fe64784d955166835646f6287f /src/server/authserver/Server/AuthSession.cpp | |
parent | eeb272040101f246d191e81c9eab9ee0c70462da (diff) |
Fixed the authserver not accepting clients.
Fixed using hostnames in the realmlist table.
Diffstat (limited to 'src/server/authserver/Server/AuthSession.cpp')
-rw-r--r-- | src/server/authserver/Server/AuthSession.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp index df90339222d..f518dc7593b 100644 --- a/src/server/authserver/Server/AuthSession.cpp +++ b/src/server/authserver/Server/AuthSession.cpp @@ -19,7 +19,6 @@ #include <memory> #include <boost/lexical_cast.hpp> #include <boost/asio/write.hpp> -#include <boost/asio/read.hpp> #include <AuthSession.h> #include <Log.h> #include "ByteBuffer.h" @@ -137,7 +136,7 @@ void AuthSession::AsyncReadHeader() { auto self(shared_from_this()); - boost::asio::async_read(_socket, boost::asio::buffer(_readBuffer, 1), [this, self](boost::system::error_code error, size_t transferedBytes) + _socket.async_read_some(boost::asio::buffer(_readBuffer, 1), [this, self](boost::system::error_code error, size_t transferedBytes) { if (!error && transferedBytes == 1) { @@ -148,7 +147,7 @@ void AuthSession::AsyncReadHeader() // Handle dynamic size packet if (_readBuffer[0] == AUTH_LOGON_CHALLENGE) { - boost::asio::read(_socket, boost::asio::buffer(&_readBuffer[1], sizeof(uint8) + sizeof(uint16))); //error + size + _socket.read_some(boost::asio::buffer(&_readBuffer[1], sizeof(uint8) + sizeof(uint16))); //error + size AsyncReadData(entry.handler, *reinterpret_cast<uint16*>(&_readBuffer[2]), sizeof(uint8) + sizeof(uint8) + sizeof(uint16)); // cmd + error + size } @@ -171,7 +170,7 @@ void AuthSession::AsyncReadData(bool (AuthSession::*handler)(), size_t dataSize, { auto self(shared_from_this()); - boost::asio::async_read(_socket, boost::asio::buffer(&_readBuffer[bufferOffSet], dataSize), [handler, this, self](boost::system::error_code error, size_t transferedBytes) + _socket.async_read_some(boost::asio::buffer(&_readBuffer[bufferOffSet], dataSize), [handler, this, self](boost::system::error_code error, size_t transferedBytes) { if (!error && transferedBytes > 0) { |