diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-06-01 00:29:33 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-06-01 00:29:33 +0200 |
commit | 6a54ed88c60f68edf2dac764a6806889b506e312 (patch) | |
tree | 7ab30dbb3b18641282e76698d449f07a7d64a57d /src | |
parent | 3ceabf962dca1a4b190b54975af1b6a9bf3b8b16 (diff) |
Core/NetworkIO: Fix performance loss when handling bad packets
Revert f9cb4280bd8f1c29e4acbae5339bce40c3b52bcb which retrieved the callstack each time a ByteBufferPositionException or a ByteBufferSourceException occurred, for example with bad packet structure.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/shared/Packets/ByteBuffer.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/server/shared/Packets/ByteBuffer.cpp b/src/server/shared/Packets/ByteBuffer.cpp index b8cb5215665..f446592e922 100644 --- a/src/server/shared/Packets/ByteBuffer.cpp +++ b/src/server/shared/Packets/ByteBuffer.cpp @@ -27,11 +27,10 @@ ByteBufferPositionException::ByteBufferPositionException(bool add, size_t pos, size_t size, size_t valueSize) { std::ostringstream ss; - ACE_Stack_Trace trace; ss << "Attempted to " << (add ? "put" : "get") << " value with size: " << valueSize << " in ByteBuffer (pos: " << pos << " size: " << size - << ")\n\n" << trace.c_str(); + << ")"; message().assign(ss.str()); } @@ -40,12 +39,10 @@ ByteBufferSourceException::ByteBufferSourceException(size_t pos, size_t size, size_t valueSize) { std::ostringstream ss; - ACE_Stack_Trace trace; ss << "Attempted to put a " << (valueSize > 0 ? "NULL-pointer" : "zero-sized value") - << " in ByteBuffer (pos: " << pos << " size: " << size << ")\n\n" - << trace.c_str(); + << " in ByteBuffer (pos: " << pos << " size: " << size << ")"; message().assign(ss.str()); } |