diff --git a/source/common/EQStream.cpp b/source/common/EQStream.cpp index bbaf3a9..fef52ad 100644 --- a/source/common/EQStream.cpp +++ b/source/common/EQStream.cpp @@ -1503,7 +1503,6 @@ void EQStream::WritePacket(int eq_fd, EQProtocolPacket *p) { uint32 length = 0; sockaddr_in address; -unsigned char tmpbuffer[2048]; address.sin_family = AF_INET; address.sin_addr.s_addr=remote_ip; address.sin_port=remote_port; @@ -1523,8 +1522,8 @@ unsigned char tmpbuffer[2048]; if (p->opcode!=OP_SessionRequest && p->opcode!=OP_SessionResponse) { if (compressed) { BytesWritten -= p->size; - uint32 newlen=EQProtocolPacket::Compress(buffer,length,tmpbuffer,2048); - memcpy(buffer,tmpbuffer,newlen); + uint32 newlen=EQProtocolPacket::Compress(buffer,length,write_buffer,2048); + memcpy(buffer,write_buffer,newlen); length=newlen; BytesWritten += newlen; } diff --git a/source/common/EQStream.h b/source/common/EQStream.h index 3ec6028..3ce45a8 100644 --- a/source/common/EQStream.h +++ b/source/common/EQStream.h @@ -151,7 +151,9 @@ class EQStream { uint8 app_opcode_size; EQStreamType StreamType; bool compressed,encoded; - + + unsigned char write_buffer[2048]; + uint32 retransmittimer; uint32 retransmittimeout; //uint32 buffer_len;