The current chat file block protocol has a few bugs in ..
1) it doesn't handle the end of the file correctly.
Specifically this line in ChatSock::OnReceive
this expects the file to always to be of blocksize 500
2) it goes against the protocol. according to
there should be no end byte, but the code in ChatSock expects it
1) it doesn't handle the end of the file correctly.
Specifically this line in ChatSock::OnReceive
// must have file block size + 2 (command and terminator)
// otherwise we will get them later
if (iLength < (m_iFileBlockSize + 2))
return;
this expects the file to always to be of blocksize 500
2) it goes against the protocol. according to
Quote:
<CHAT_FILE_BLOCK><block of data>
A file block is 500 bytes. A file block is ALWAYS 500 bytes so no CHAT_END_OF_COMMAND is needed.
<CHAT_FILE_BLOCK><block of data>
A file block is 500 bytes. A file block is ALWAYS 500 bytes so no CHAT_END_OF_COMMAND is needed.
there should be no end byte, but the code in ChatSock expects it
// discard the file block and message number and terminator byte
m_outstanding_input = m_outstanding_input.Mid (m_iFileBlockSize + 2);