X-Git-Url: https://git.syn-net.org/debian/?a=blobdiff_plain;f=src%2FsyncServer.cpp;h=21302c2903d63e5ecaadd3f6c0b984c415ffd00c;hb=326bc57905738d0bd416ce3d0d7cc79b14ef7a4a;hp=35ad3f2f61c2275a3029ef5ba3829fc8ac6a33f1;hpb=65944fb7a518dc659bacaf80cf235a0352fc6a7e;p=anytun.git diff --git a/src/syncServer.cpp b/src/syncServer.cpp index 35ad3f2..21302c2 100644 --- a/src/syncServer.cpp +++ b/src/syncServer.cpp @@ -65,7 +65,7 @@ SyncServer::~SyncServer() } } -void SyncServer::onResolve(SyncTcpConnection::proto::resolver::iterator& it) +void SyncServer::onResolve(SyncTcpConnection::proto::resolver::iterator it) { while(it != SyncTcpConnection::proto::resolver::iterator()) { SyncTcpConnection::proto::endpoint e = *it; @@ -125,7 +125,11 @@ void SyncServer::start_accept() std::list::iterator it = acceptors_.begin(); for(; it != acceptors_.end(); ++it) { if(!it->started_) { +#if BOOST_VERSION >= 107000 + SyncTcpConnection::pointer new_connection = SyncTcpConnection::create(it->acceptor_->get_executor()); +#else SyncTcpConnection::pointer new_connection = SyncTcpConnection::create(it->acceptor_->get_io_service()); +#endif conns_.push_back(new_connection); it->acceptor_->async_accept(new_connection->socket(), boost::bind(&SyncServer::handle_accept, this, new_connection, boost::asio::placeholders::error, it));