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/receiverhelper.h>
#include <net/socket_msg.h> #include <net/socket_msg.h>
#include <net/netexception.h> #include <net/netexception.h>
#include <core/loghelper.h>
#include <cstring> #include <cstring>
using namespace std; using namespace std;
@@ -107,11 +108,11 @@ ReceiverHelper::InternalGetPackets(ReceiveBuffer &buf)
// This call will also handle the memmove stuff, i.e. // This call will also handle the memmove stuff, i.e.
// buffering for partial packets. // buffering for partial packets.
tmpPacket = NetPacket::Create(buf.recvBuf, buf.recvBufUsed); tmpPacket = NetPacket::Create(buf.recvBuf, buf.recvBufUsed);
} catch (const NetException &) } catch (const NetException &e)
{ {
// Reset buffer on error. // Reset buffer on error.
buf.recvBufUsed = 0; buf.recvBufUsed = 0;
// TODO: log error/increase error counter. LOG_ERR(e.what());
} }
} }
if (tmpPacket.get()) if (tmpPacket.get())