Jump to content

WorldSocket::m_OutBuffer and WorldSocket::m_PacketQueue can work correctly?


Guest ganyamdc

Recommended Posts

in WorldSocket::handle_output function, code block

else if (n < send_len) //now n > 0

{

m_OutBuffer->rd_ptr (static_cast<size_t> (n));

// move the data to the base of the buffer

m_OutBuffer->crunch ();

crunch call means move the data to the base.

I think it's needed to move the data in WorldSocket::m_PacketQueue to the left space of m_OutBuffer, to fill m_OutBuffer. if don't, new data need sent will be put in it, and send before the data in WorldSocket::m_PacketQueue. That's incorrect.

I wonder why?

Link to comment
Share on other sites

Hello, You are correct, this is bug, however it is fixed in previous commits. The problem is missing check in iSendPacket for m_PacketQueue.is_empty(), in git netcode, this packet queue no longer exists.

I am glad that somebody else is looking around this code, If you find another bug please send me a pm, or post it in the bug section.

If you want to find bugs or examine how mangos works just send me a pm, I have several ideas on what you can do.

Link to comment
Share on other sites

Thats because git doesnt use revision numbers.
Not natively, but we got it to use revision numbers and oddly enough it does that much better than things that were designed for it. The number is in revision_nr.h if you want to read it with external tools. It's shown in the client, server startup, wheaty crash log etc. All of those work even if you downloaded a snapshot of the sources instead of the git repo. It's shown in the commit log at the start of the commit message. You can even use the revision number instead of the SHA with existing git commands e.g: git reset --hard :/[6910]
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use