Bunch of crazy changes to remove logsys

This commit is contained in:
Akkadius
2015-01-18 03:23:36 -06:00
parent 7fac4d5f52
commit b3bedef7af
11 changed files with 88 additions and 73 deletions
+10 -10
View File
@@ -93,7 +93,7 @@ EQRawApplicationPacket *EQStream::MakeApplicationPacket(EQProtocolPacket *p)
{
EQRawApplicationPacket *ap=nullptr;
Log.Out(Logs::Detail, Logs::Netcode, _L "Creating new application packet, length %d" __L, p->size);
_raw(NET__APP_CREATE_HEX, 0xFFFF, p);
// _raw(NET__APP_CREATE_HEX, 0xFFFF, p);
ap = p->MakeAppPacket();
return ap;
}
@@ -102,7 +102,7 @@ EQRawApplicationPacket *EQStream::MakeApplicationPacket(const unsigned char *buf
{
EQRawApplicationPacket *ap=nullptr;
Log.Out(Logs::Detail, Logs::Netcode, _L "Creating new application packet, length %d" __L, len);
_hex(NET__APP_CREATE_HEX, buf, len);
Log.Hex(Logs::Netcode, buf, len);
ap = new EQRawApplicationPacket(buf, len);
return ap;
}
@@ -133,7 +133,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
if (!Session && p->opcode!=OP_SessionRequest && p->opcode!=OP_SessionResponse) {
Log.Out(Logs::Detail, Logs::Netcode, _L "Session not initialized, packet ignored" __L);
_raw(NET__DEBUG, 0xFFFF, p);
// _raw(NET__DEBUG, 0xFFFF, p);
return;
}
@@ -144,7 +144,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
subpacket_length=*(p->pBuffer+processed);
EQProtocolPacket *subp=MakeProtocolPacket(p->pBuffer+processed+1,subpacket_length);
Log.Out(Logs::Detail, Logs::Netcode, _L "Extracting combined packet of length %d" __L, subpacket_length);
_raw(NET__NET_CREATE_HEX, 0xFFFF, subp);
// _raw(NET__NET_CREATE_HEX, 0xFFFF, subp);
subp->copyInfo(p);
ProcessPacket(subp);
delete subp;
@@ -185,7 +185,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
SeqOrder check=CompareSequence(NextInSeq,seq);
if (check == SeqFuture) {
Log.Out(Logs::Detail, Logs::Netcode, _L "Future OP_Packet: Expecting Seq=%d, but got Seq=%d" __L, NextInSeq, seq);
_raw(NET__DEBUG, seq, p);
// _raw(NET__DEBUG, seq, p);
PacketQueue[seq]=p->Copy();
Log.Out(Logs::Detail, Logs::Netcode, _L "OP_Packet Queue size=%d" __L, PacketQueue.size());
@@ -194,7 +194,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
} else if (check == SeqPast) {
Log.Out(Logs::Detail, Logs::Netcode, _L "Duplicate OP_Packet: Expecting Seq=%d, but got Seq=%d" __L, NextInSeq, seq);
_raw(NET__DEBUG, seq, p);
// _raw(NET__DEBUG, seq, p);
SendOutOfOrderAck(seq); //we already got this packet but it was out of order
} else {
// In case we did queue one before as well.
@@ -210,7 +210,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
if (*(p->pBuffer+2)==0x00 && *(p->pBuffer+3)==0x19) {
EQProtocolPacket *subp=MakeProtocolPacket(p->pBuffer+2,p->size-2);
Log.Out(Logs::Detail, Logs::Netcode, _L "seq %d, Extracting combined packet of length %d" __L, seq, subp->size);
_raw(NET__NET_CREATE_HEX, seq, subp);
// _raw(NET__NET_CREATE_HEX, seq, subp);
subp->copyInfo(p);
ProcessPacket(subp);
delete subp;
@@ -235,7 +235,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
SeqOrder check=CompareSequence(NextInSeq,seq);
if (check == SeqFuture) {
Log.Out(Logs::Detail, Logs::Netcode, _L "Future OP_Fragment: Expecting Seq=%d, but got Seq=%d" __L, NextInSeq, seq);
_raw(NET__DEBUG, seq, p);
// _raw(NET__DEBUG, seq, p);
PacketQueue[seq]=p->Copy();
Log.Out(Logs::Detail, Logs::Netcode, _L "OP_Fragment Queue size=%d" __L, PacketQueue.size());
@@ -244,7 +244,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
} else if (check == SeqPast) {
Log.Out(Logs::Detail, Logs::Netcode, _L "Duplicate OP_Fragment: Expecting Seq=%d, but got Seq=%d" __L, NextInSeq, seq);
_raw(NET__DEBUG, seq, p);
// _raw(NET__DEBUG, seq, p);
SendOutOfOrderAck(seq);
} else {
// In case we did queue one before as well.
@@ -263,7 +263,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
if (*(p->pBuffer+2)==0x00 && *(p->pBuffer+3)==0x19) {
EQProtocolPacket *subp=MakeProtocolPacket(oversize_buffer,oversize_offset);
Log.Out(Logs::Detail, Logs::Netcode, _L "seq %d, Extracting combined oversize packet of length %d" __L, seq, subp->size);
//_raw(NET__NET_CREATE_HEX, subp);
//// _raw(NET__NET_CREATE_HEX, subp);
subp->copyInfo(p);
ProcessPacket(subp);
delete subp;