removed another debugging test and corrected one debuggin output
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 11 Feb 2015 13:58:37 +0000 (14:58 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 11 Feb 2015 13:58:37 +0000 (14:58 +0100)
src/icmp/icmppinger.cpp

index 3c50cfe..8afee66 100644 (file)
@@ -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;
     }