From: Christian Herdtweck Date: Mon, 8 Dec 2014 09:45:00 +0000 (+0100) Subject: debug-log-message when there is unused data in buffer, which is probably reason for... X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=62823760749a54b0d286444e94020af93fb2b0ba;p=pingcheck debug-log-message when there is unused data in buffer, which is probably reason for frequent broken packages --- diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index e0fa829..3329913 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -206,6 +206,8 @@ void IcmpPinger::handle_ping_done() void IcmpPinger::start_receive() { // Discard any data already in the buffer. + if (ReplyBuffer.size() > 0) + GlobalLogger.debug() << "consuming unused " << ReplyBuffer.size() << "bytes!" << endl; ReplyBuffer.consume( ReplyBuffer.size() ); // Waiting for a reply. We prepare the buffer to receive up to 64KB.