Core/NetworkIO: Fix performance loss when handling bad packets

Revert f9cb4280bd which retrieved the callstack each time a ByteBufferPositionException or a ByteBufferSourceException occurred, for example with bad packet structure.
This commit is contained in:
jackpoz
2014-06-01 00:29:33 +02:00
parent 3ceabf962d
commit 6a54ed88c6

View File

@@ -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());
}