From: Christian Herdtweck Date: Wed, 11 Feb 2015 13:58:37 +0000 (+0100) Subject: removed another debugging test and corrected one debuggin output X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=d4e17c7a0f1002c458952d35cb098af6a95675a3;p=pingcheck removed another debugging test and corrected one debuggin output --- 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; }