From 3eb8c4bd7ecb3cb7729a3167ecb2e30afde57d98 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Sun, 11 Mar 2012 18:21:01 -0300 Subject: [PATCH] Added a method specially to initialize the pinger object for the first time. --- src/host/pingrotate.cpp | 7 ++++++- src/host/pingrotate.h | 1 + 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/host/pingrotate.cpp b/src/host/pingrotate.cpp index c8b3433..ab5c671 100644 --- a/src/host/pingrotate.cpp +++ b/src/host/pingrotate.cpp @@ -71,7 +71,7 @@ PingRotate::PingRotate( BOOST_ASSERT( !nameserver.empty() ); BOOST_ASSERT( 0 < protocol_list.size() ); - update_ping_protocol(); + init_ping_protocol(); } /** @@ -130,6 +130,11 @@ void PingRotate::ping_done_handler( bool ping_success ) PingDoneCallback( ping_success ); } +void PingRotate::init_ping_protocol() +{ + get_next_ping_protocol(); +} + void PingRotate::update_ping_protocol() { if ( can_change_ping_protocol() ) diff --git a/src/host/pingrotate.h b/src/host/pingrotate.h index e4ad557..22aa076 100644 --- a/src/host/pingrotate.h +++ b/src/host/pingrotate.h @@ -69,6 +69,7 @@ private: void set_ping_done_callback( boost::function ping_done_callback ); void ping_done_handler( bool ping_success ); + void init_ping_protocol(); void update_ping_protocol(); void get_next_ping_protocol(); bool can_change_ping_protocol() const; -- 1.7.1