mirror of
https://github.com/edubart/otclient.git
synced 2025-12-16 05:39:47 +01:00
add a new folder structure redesign organized by packages
This commit is contained in:
@@ -87,6 +87,6 @@ std::string InputMessage::getString()
|
||||
bool InputMessage::canRead(int bytes)
|
||||
{
|
||||
if((m_readPos + bytes > m_messageSize) || (m_readPos + bytes > BUFFER_MAXSIZE))
|
||||
fatal("[InputMessage::canRead()]: Cant read. Message is finished or read position has reached buffer's maximum size.");
|
||||
logFatal("[InputMessage::canRead()]: Cant read. Message is finished or read position has reached buffer's maximum size.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,6 @@ void OutputMessage::addPaddingBytes(int bytes, uint8 byte)
|
||||
bool OutputMessage::canWrite(int bytes)
|
||||
{
|
||||
if(m_writePos + bytes > BUFFER_MAXSIZE)
|
||||
fatal("[OutputMessage::canWrite()]: Can't write. Write position has reached buffer's maxium size.");
|
||||
logFatal("[OutputMessage::canWrite()]: Can't write. Write position has reached buffer's maxium size.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ void Protocol::onRecv(InputMessage *inputMessage)
|
||||
uint32 checksum = getAdlerChecksum(inputMessage->getBuffer() + InputMessage::DATA_POS, inputMessage->getMessageSize() - InputMessage::CHECKSUM_LENGTH);
|
||||
if(inputMessage->getU32() != checksum) {
|
||||
// error
|
||||
error("Checksum is invalid.");
|
||||
logError("Checksum is invalid.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void Protocol::onRecv(InputMessage *inputMessage)
|
||||
|
||||
void Protocol::onError(const boost::system::error_code& err)
|
||||
{
|
||||
error("PROTOCOL ERROR: ", err.message());
|
||||
logError("PROTOCOL ERROR: ", err.message());
|
||||
|
||||
// invalid hostname
|
||||
// connection timeouted
|
||||
|
||||
Reference in New Issue
Block a user