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
+4 -4
View File
@@ -65,7 +65,7 @@
#define ENCODE_LENGTH_EXACT(struct_) \
if((*p)->size != sizeof(struct_)) { \
Log.Out(Logs::Detail, Logs::Netcode, "Wrong size on outbound %s (" #struct_ "): Got %d, expected %d", opcodes->EmuToName((*p)->GetOpcode()), (*p)->size, sizeof(struct_)); \
_hex(NET__STRUCT_HEX, (*p)->pBuffer, (*p)->size); \
Log.Hex(Logs::Netcode, (*p)->pBuffer, (*p)->size); \
delete *p; \
*p = nullptr; \
return; \
@@ -73,7 +73,7 @@
#define ENCODE_LENGTH_ATLEAST(struct_) \
if((*p)->size < sizeof(struct_)) { \
Log.Out(Logs::Detail, Logs::Netcode, "Wrong size on outbound %s (" #struct_ "): Got %d, expected at least %d", opcodes->EmuToName((*p)->GetOpcode()), (*p)->size, sizeof(struct_)); \
_hex(NET__STRUCT_HEX, (*p)->pBuffer, (*p)->size); \
Log.Hex(Logs::Netcode, (*p)->pBuffer, (*p)->size); \
delete *p; \
*p = nullptr; \
return; \
@@ -128,14 +128,14 @@
if(__packet->size != sizeof(struct_)) { \
__packet->SetOpcode(OP_Unknown); /* invalidate the packet */ \
Log.Out(Logs::Detail, Logs::Netcode, "Wrong size on incoming %s (" #struct_ "): Got %d, expected %d", opcodes->EmuToName(__packet->GetOpcode()), __packet->size, sizeof(struct_)); \
_hex(NET__STRUCT_HEX, __packet->pBuffer, __packet->size); \
Log.Hex(Logs::Netcode, __packet->pBuffer, __packet->size); \
return; \
}
#define DECODE_LENGTH_ATLEAST(struct_) \
if(__packet->size < sizeof(struct_)) { \
__packet->SetOpcode(OP_Unknown); /* invalidate the packet */ \
Log.Out(Logs::Detail, Logs::Netcode, "Wrong size on incoming %s (" #struct_ "): Got %d, expected at least %d", opcodes->EmuToName(__packet->GetOpcode()), __packet->size, sizeof(struct_)); \
_hex(NET__STRUCT_HEX, __packet->pBuffer, __packet->size); \
Log.Hex(Logs::Netcode, __packet->pBuffer, __packet->size); \
return; \
}