diff options
author | Francis Dupont <fdupont@isc.org> | 2015-09-02 19:49:11 +0200 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2015-09-02 19:49:11 +0200 |
commit | b494fd351e5027d1c5f68fa5a7a562e014ea0cd0 (patch) | |
tree | 5524bb7e4d7b9c23341f02b1aa5234e3e833818d /src/lib/asiolink/interval_timer.cc | |
parent | [4031] Cleaned up asiolink (tentative) (diff) | |
download | kea-b494fd351e5027d1c5f68fa5a7a562e014ea0cd0.tar.xz kea-b494fd351e5027d1c5f68fa5a7a562e014ea0cd0.zip |
[4009] Added boost to asio (tentative)
Diffstat (limited to 'src/lib/asiolink/interval_timer.cc')
-rw-r--r-- | src/lib/asiolink/interval_timer.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/asiolink/interval_timer.cc b/src/lib/asiolink/interval_timer.cc index 41efba9bc4..317a61ac03 100644 --- a/src/lib/asiolink/interval_timer.cc +++ b/src/lib/asiolink/interval_timer.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011, 2014 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011, 2014-2015 Internet Systems Consortium, Inc. ("ISC") // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above @@ -20,7 +20,7 @@ #include <exceptions/exceptions.h> -#include <asio.hpp> +#include <boost/asio.hpp> #include <asiolink/interval_timer.h> #include <asiolink/io_service.h> @@ -47,7 +47,7 @@ public: void setup(const IntervalTimer::Callback& cbfunc, const long interval, const IntervalTimer::Mode& interval_mode = IntervalTimer::REPEATING); - void callback(const asio::error_code& error); + void callback(const boost::asio::error_code& error); void cancel() { timer_.cancel(); interval_ = 0; @@ -61,7 +61,7 @@ private: // interval in milliseconds long interval_; // asio timer - asio::deadline_timer timer_; + boost::asio::deadline_timer timer_; // Controls how the timer behaves after expiration. IntervalTimer::Mode mode_; @@ -113,8 +113,8 @@ IntervalTimerImpl::update() { // Pass a function bound with a shared_ptr to this. timer_.async_wait(boost::bind(&IntervalTimerImpl::callback, shared_from_this(), - asio::placeholders::error)); - } catch (const asio::system_error& e) { + boost::asio::placeholders::error)); + } catch (const boost::asio::system_error& e) { isc_throw(isc::Unexpected, "Failed to update timer: " << e.what()); } catch (const boost::bad_weak_ptr&) { // Can't happen. It means a severe internal bug. @@ -123,7 +123,7 @@ IntervalTimerImpl::update() { } void -IntervalTimerImpl::callback(const asio::error_code& ec) { +IntervalTimerImpl::callback(const boost::asio::error_code& ec) { assert(interval_ != INVALIDATED_INTERVAL); if (interval_ == 0 || ec) { // timer has been canceled. Do nothing. |