mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Revert "Fix for character select screen client crashes (fix #418)"
This reverts commit 92c756c8207fc069973956257e83336862394e7d.
This commit is contained in:
parent
92c756c820
commit
dbd615572c
@ -1,7 +1,5 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 05/26/2015 ==
|
||||
Uleat: Fix for packet size adjustment after initial declaration (issue #418) - should clear up some random client crashes and the inability to progress to charsel screen on affected accounts
|
||||
|
||||
== 05/25/2015 ==
|
||||
Akkadius: Implemented disjointed zone based time, this can be triggered via quest methods
|
||||
|
||||
@ -571,25 +571,12 @@ void EQStream::SendPacket(uint16 opcode, EQApplicationPacket *p)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// The (p->size++) and (length--) modification code inside of the (opcode & 0x00FF == 0) checks are a temporary solution
|
||||
// to a discongruency in packet size due to an alteration of packet size after the initial declaration. This led to client
|
||||
// crashes where the original packet size + protocol bytes mod MaxLen() produced a 0 result.
|
||||
//
|
||||
// These changes are local-only and there may be other calling methods affected by the EQ##Packet::serialize() issue.
|
||||
if ((opcode & 0x00FF) == 0) { // this is final..but, had scope issues during early testing at this point
|
||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Adjusting application packet length for high byte opcode 0x%04X (%d to %d)" __L, opcode, p->size++, p->size);
|
||||
}
|
||||
|
||||
// Convert the EQApplicationPacket to 1 or more EQProtocolPackets
|
||||
if (p->size>(MaxLen-8)) { // proto-op(2), seq(2), app-op(2) ... data ... crc(2)
|
||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Making oversized packet, len %d" __L, p->size);
|
||||
|
||||
unsigned char *tmpbuff=new unsigned char[p->size+3];
|
||||
length=p->serialize(opcode, tmpbuff);
|
||||
if ((opcode & 0x00FF) == 0) { // temp solution until all serialize() calls can be evaluated
|
||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Adjusting protocol packet length for high byte opcode 0x%04X (%d to %d)" __L, opcode, length--, length);
|
||||
}
|
||||
|
||||
EQProtocolPacket *out=new EQProtocolPacket(OP_Fragment,nullptr,MaxLen-4);
|
||||
*(uint32 *)(out->pBuffer+2)=htonl(p->Size());
|
||||
@ -614,9 +601,6 @@ void EQStream::SendPacket(uint16 opcode, EQApplicationPacket *p)
|
||||
|
||||
unsigned char *tmpbuff=new unsigned char[p->Size()+3];
|
||||
length=p->serialize(opcode, tmpbuff+2) + 2;
|
||||
if ((opcode & 0x00FF) == 0) { // temp solution until all serialize() calls can be evaluated
|
||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Adjusting protocol packet length for high byte opcode 0x%04X (%d to %d)" __L, opcode, length--, length);
|
||||
}
|
||||
|
||||
EQProtocolPacket *out=new EQProtocolPacket(OP_Packet,tmpbuff,length);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user