I have debugged desintegrate problem and from my observation this might caused it:
void Protocol:
nSendMessage(OutputMessage_ptr msg)
{
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Protocol:
nSendMessage" << std::endl;
#endif
if (!m_rawMessages){
msg->writeMessageLength();
if (m_encryptionEnabled){
XTEA_encrypt(*msg);
msg->addCryptoHeader();
}
if (msg == m_outputBuffer){
m_outputBuffer.reset();
}
}
/*if(!m_rawMessages){
msg->writeMessageLength();
if(m_encryptionEnabled){
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Protocol:
nSendMessage - encrypt" << std::endl;
#endif
XTEA_encrypt(*msg);
msg->addCryptoHeader(m_checksumEnabled);
}
else if(m_checksumEnabled){
msg->addCryptoHeader(true);
}
}*/
if(msg == m_outputBuffer){
m_outputBuffer.reset();
}
}
is there any particulator reason why you changed it?