From 352a4127cfb100a3fb59064e4b4e0de7a3b885a0 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 4 Mar 2009 20:32:22 +0000 Subject: fix build --- src/resolver.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/resolver.cpp') diff --git a/src/resolver.cpp b/src/resolver.cpp index c4df658..5a230ae 100644 --- a/src/resolver.cpp +++ b/src/resolver.cpp @@ -30,21 +30,22 @@ */ #include +#include #include "resolver.h" #include "log.h" -template ResolveHandler::ResolveHandler(const std::string& addr, const std::string& port, boost::function const& onResolve) : addr_(addr), port_(port), callback_(onResolve) +template ResolveHandler::ResolveHandler(const std::string& addr, const std::string& port, boost::function)> const& onResolve) : addr_(addr), port_(port), callback_(onResolve) { } template void ResolveHandler::operator()(const boost::system::error_code& e, const boost::asio::ip::basic_resolver_iterator endpointIt) { cLog.msg(Log::PRIO_DEBUG) << "ResolveHandler<" << typeid(Proto).name() << ">() called, addr='" << addr_ << "', port='" << port_ << "'"; - if(boost::system::errc:success == e) { + if(boost::system::posix_error::success == e) { callback_(*endpointIt); } else { - cLog.msg(Log::PRIO_ERROR) << << "ResolveHandler<" << typeid(Proto).name() << ">(): " << e; + cLog.msg(Log::PRIO_ERROR) << "ResolveHandler<" << typeid(Proto).name() << ">(): " << e; } } @@ -100,7 +101,7 @@ void Resolver::resolveUdp(const std::string& addr, const std::string& port, boos udp_resolver_.async_resolve(query, handler); } -void Resolver::resolveTcp(const std::string& addr, const std::string& port, boost::function const& onResolve) +void Resolver::resolveTcp(const std::string& addr, const std::string& port, boost::function const& onResolve) { cLog.msg(Log::PRIO_DEBUG) << "trying to resolv TCP: " << addr << " " << port; -- cgit v1.2.3