From: Guilherme Maciel Ferreira Date: Sun, 6 Nov 2011 21:38:10 +0000 (-0200) Subject: Renamed variable, most significant noun first X-Git-Tag: v1.2~31 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=0697580fc4a6b8aaad901b81fba8ca4f55f0ae72;p=pingcheck Renamed variable, most significant noun first --- diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index 5d64b33..d0fa09a 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -38,6 +38,9 @@ using I2n::Logger::GlobalLogger; // IcmpPinger //----------------------------------------------------------------------------- +/** + * @brief Parameterized constructor. + */ IcmpPinger::IcmpPinger( io_service &io_serv, const string &source_network_interface, @@ -52,7 +55,7 @@ IcmpPinger::IcmpPinger( SequenceNumber( 0 ), TimeSent( microsec_clock::universal_time() ), ReplyBuffer(), - ReceivedReply( false ), + ReplyReceived( false ), EchoReplyTimeoutInSec( echo_reply_timeout_in_sec ), PingerStatus( PingStatus_NotSent ), PingDoneCallback() @@ -71,6 +74,9 @@ IcmpPinger::IcmpPinger( memcpy( &Identifier, random_tag.data, sizeof(Identifier) ); } +/** + * @brief Destructor. + */ IcmpPinger::~IcmpPinger() { } @@ -157,7 +163,7 @@ void IcmpPinger::send_echo_request( const IcmpPacketItem icmp_packet ) void IcmpPinger::schedule_timeout_echo_reply() { // Wait up to N seconds for a reply. - ReceivedReply = false; + ReplyReceived = false; (void) IcmpPacketReceiveTimer.expires_at( TimeSent + seconds( EchoReplyTimeoutInSec ) ); @@ -173,9 +179,9 @@ void IcmpPinger::schedule_timeout_echo_reply() **/ void IcmpPinger::handle_ping_done() { - // Check ReceivedReply as the timer handler + // Check ReplyReceived as the timer handler // is also called by Timer.cancel(); - if ( ReceivedReply == false ) + if ( ReplyReceived == false ) { GlobalLogger.info() << "Request timed out" << endl; @@ -243,7 +249,7 @@ void IcmpPinger::handle_receive_icmp_packet( const size_t &bytes_transferred ) Identifier, SequenceNumber, DestinationEndpoint.address() ) ) { - ReceivedReply = true; + ReplyReceived = true; icmp_packet->print_echo_reply( bytes_transferred, TimeSent ); @@ -255,7 +261,7 @@ void IcmpPinger::handle_receive_icmp_packet( const size_t &bytes_transferred ) Identifier, SequenceNumber, DestinationEndpoint.address() ) ) { - ReceivedReply = true; + ReplyReceived = true; icmp_packet->print_destination_unreachable(); diff --git a/src/icmp/icmppinger.h b/src/icmp/icmppinger.h index c811f3f..4fdbcca 100644 --- a/src/icmp/icmppinger.h +++ b/src/icmp/icmppinger.h @@ -75,8 +75,7 @@ private: /// The buffer where the data received will be placed boost::asio::streambuf ReplyBuffer; /// Flag to indicate if we got a reply or not - /// number of replies to the ICMP echo request - bool ReceivedReply; + bool ReplyReceived; /// The amount of time to wait for the reply int EchoReplyTimeoutInSec; /// The status of the pinger