simplified dns (no self-made recursion); merge PingScheduler and PingRotate; make...
[pingcheck] / src / icmp / icmppinger.cpp
index 8296252..501a8b7 100644 (file)
@@ -122,7 +122,7 @@ IcmpPinger::~IcmpPinger()
  * @return void.
  */
 void IcmpPinger::ping(
-        const string &destination_ip,
+        const address &destination_ip,
         const uint16_t /*destination_port*/, // the ICMP protocol does not use ports
         function<void(bool)> ping_done_callback
 )
@@ -167,13 +167,10 @@ void IcmpPinger::stop_pinging()
 }
 
 
-void IcmpPinger::set_destination_endpoint( const string &destination_ip )
+void IcmpPinger::set_destination_endpoint( const address &destination_ip )
 {
-    BOOST_ASSERT( !destination_ip.empty() );
-
     uint16_t port = 0;
-    address destination_address = address::from_string( destination_ip );
-    DestinationEndpoint = icmp::endpoint( destination_address, port );
+    DestinationEndpoint = icmp::endpoint( destination_ip, port );
 }
 
 bool IcmpPinger::start_send()