From d4e17c7a0f1002c458952d35cb098af6a95675a3 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Wed, 11 Feb 2015 14:58:37 +0100 Subject: [PATCH] removed another debugging test and corrected one debuggin output --- src/icmp/icmppinger.cpp | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index 3c50cfe..8afee66 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -154,7 +154,7 @@ void IcmpPinger::stop_pinging() GlobalLogger.debug() << DestinationEndpoint.address().to_string() - << ": cancel timer" << endl; + << ": unregister" << endl; PacketDistributor->unregister_pinger( icmp_item ); } @@ -498,24 +498,16 @@ void IcmpPacketDistributor::handle_receive( } // check which pinger wants this packet - //bool packet_matches = false; - int n_matches = 0; + bool packet_matches = false; BOOST_FOREACH( IcmpPingerItem pinger, PingerList ) { - /* packet_matches |= pinger->handle_receive_icmp_packet(icmp_packet, bytes_transferred); if (packet_matches) break; - */ - if (pinger->handle_receive_icmp_packet(icmp_packet, - bytes_transferred) ) - ++n_matches; } - BOOST_ASSERT(n_matches < 2); - //if (!packet_matches) - if (n_matches == 0) + if (!packet_matches) GlobalLogger.warning() << "Packet did not match any pinger" << std::endl; } -- 1.7.1