Enable logging of netpacket errors.

This commit is contained in:
lotodore
2007-11-22 20:07:41 +00:00
parent 49162870a1
commit af12e4f35e
+3 -2
View File
@@ -24,6 +24,7 @@
#include <net/receiverhelper.h>
#include <net/socket_msg.h>
#include <net/netexception.h>
#include <core/loghelper.h>
#include <cstring>
using namespace std;
@@ -107,11 +108,11 @@ ReceiverHelper::InternalGetPackets(ReceiveBuffer &buf)
// This call will also handle the memmove stuff, i.e.
// buffering for partial packets.
tmpPacket = NetPacket::Create(buf.recvBuf, buf.recvBufUsed);
} catch (const NetException &)
} catch (const NetException &e)
{
// Reset buffer on error.
buf.recvBufUsed = 0;
// TODO: log error/increase error counter.
LOG_ERR(e.what());
}
}
if (tmpPacket.get())