clean containers when relogging

This commit is contained in:
Eduardo Bart
2012-04-03 11:15:11 -03:00
parent 4b7e0e8e58
commit d4afb71263
5 changed files with 40 additions and 9 deletions

View File

@@ -107,6 +107,12 @@ void Protocol::internalRecvHeader(uint8* buffer, uint16 size)
void Protocol::internalRecvData(uint8* buffer, uint16 size)
{
// process data only if really connected
if(!isConnected()) {
logTraceError("received data while disconnected");
return;
}
memcpy(m_inputMessage.getBuffer() + InputMessage::CHECKSUM_POS, buffer, size);
if(m_checksumEnabled) {