From c2a393eecb538a798fa2f46e34d18f0569baa91d Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Mon, 1 Aug 2011 22:20:36 -0300 Subject: [PATCH] Renamed timeout variable to the context of TCP instead of ICMP --- src/tcp/tcppinger.cpp | 8 ++++---- src/tcp/tcppinger.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tcp/tcppinger.cpp b/src/tcp/tcppinger.cpp index 018e3b5..ea99374 100644 --- a/src/tcp/tcppinger.cpp +++ b/src/tcp/tcppinger.cpp @@ -55,7 +55,7 @@ using I2n::Logger::GlobalLogger; TcpPinger::TcpPinger( io_service &io_serv, const string &source_network_interface_name, - const int echo_reply_timeout_in_sec + const int rst_reply_timeout_in_sec ) : IoService( io_serv ), DestinationEndpoint(), @@ -67,7 +67,7 @@ TcpPinger::TcpPinger( TimeSent( microsec_clock::universal_time() ), ReplyBuffer(), ReceivedReply( false ), - EchoReplyTimeoutInSec( echo_reply_timeout_in_sec ), + RstReplyTimeoutInSec( rst_reply_timeout_in_sec ), PingerStatus( PingStatus_NotSent ), PingDoneCallback() { @@ -202,7 +202,7 @@ void TcpPinger::start_send() // Wait up to N seconds for a reply. ReceivedReply = false; (void) TcpSegmentReceiveTimer.expires_at( - TimeSent + seconds( EchoReplyTimeoutInSec ) + TimeSent + seconds( RstReplyTimeoutInSec ) ); TcpSegmentReceiveTimer.async_wait( boost::bind( &TcpPinger::handle_timeout, this ) @@ -235,7 +235,7 @@ void TcpPinger::handle_timeout() { ReceivedReply = false; TcpSegmentReceiveTimer.expires_at( - TimeSent + seconds( EchoReplyTimeoutInSec ) + TimeSent + seconds( RstReplyTimeoutInSec ) ); TcpSegmentReceiveTimer.async_wait( boost::bind( &TcpPinger::start_send, this ) diff --git a/src/tcp/tcppinger.h b/src/tcp/tcppinger.h index 3826681..4013cdc 100644 --- a/src/tcp/tcppinger.h +++ b/src/tcp/tcppinger.h @@ -44,7 +44,7 @@ public: TcpPinger( boost::asio::io_service &io_service, const std::string &source_network_interface_name, - const int echo_reply_timeout_in_sec + const int rst_reply_timeout_in_sec ); virtual ~TcpPinger(); @@ -113,7 +113,7 @@ private: /// number of replies to the ICMP echo request bool ReceivedReply; /// the amount of time to wait for the reply - int EchoReplyTimeoutInSec; + int RstReplyTimeoutInSec; /// the status of the pinger TcpPinger::PingStatus PingerStatus; /// Callback to notify when the ping is done (got reply/timeout) -- 1.7.1