From: Guilherme Maciel Ferreira Date: Fri, 8 Apr 2011 15:39:19 +0000 (+0200) Subject: Separate method to print the timeout of a echo request X-Git-Tag: v1.0~88 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=f442d5f5622c0b056bf5d3dac2af189f55eee020;p=pingcheck Separate method to print the timeout of a echo request --- diff --git a/src/ping/boostpinger.cpp b/src/ping/boostpinger.cpp index 4d77213..a53416a 100644 --- a/src/ping/boostpinger.cpp +++ b/src/ping/boostpinger.cpp @@ -172,7 +172,7 @@ void BoostPinger::handle_timeout_echo_reply() { if ( RepliesCount == 0 ) { - cout << "Request timed out" << endl; + print_request_timeout(); set_ping_status( PingStatus_FailureTimeout ); } @@ -255,6 +255,11 @@ void BoostPinger::handle_receive_icmp_packet( const size_t &bytes_transferred ) start_receive(); } +void BoostPinger::print_request_timeout() +{ + cout << "Request timed out" << endl; +} + void BoostPinger::print_echo_reply( const IcmpPacket &icmp_packet, const size_t &bytes_transferred diff --git a/src/ping/boostpinger.h b/src/ping/boostpinger.h index bb96daf..0da0485 100644 --- a/src/ping/boostpinger.h +++ b/src/ping/boostpinger.h @@ -47,6 +47,8 @@ private: void start_receive(); void handle_receive_icmp_packet( const std::size_t &bytes_transferred ); + + void print_request_timeout(); void print_echo_reply( const IcmpPacket &icmp_packet, const std::size_t &bytes_transferred