From 05bf3b819589fdf73846c861e0709ccf0a7db1eb Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Thu, 28 Aug 2008 12:06:42 +0000 Subject: [PATCH] Fix duplicate variable warning. Use get_io_service() rather than deprecated io_service() function. [SVN r48416] --- include/boost/asio/impl/read_until.ipp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/boost/asio/impl/read_until.ipp b/include/boost/asio/impl/read_until.ipp index 8c970a71..d8d26910 100644 --- a/include/boost/asio/impl/read_until.ipp +++ b/include/boost/asio/impl/read_until.ipp @@ -449,7 +449,7 @@ void async_read_until(AsyncReadStream& s, // Found a match. We're done. boost::system::error_code ec; std::size_t bytes = iter - begin + 1; - s.io_service().post(detail::bind_handler(handler, ec, bytes)); + s.get_io_service().post(detail::bind_handler(handler, ec, bytes)); return; } @@ -457,7 +457,7 @@ void async_read_until(AsyncReadStream& s, if (b.size() == b.max_size()) { boost::system::error_code ec(error::not_found); - s.io_service().post(detail::bind_handler(handler, ec, 0)); + s.get_io_service().post(detail::bind_handler(handler, ec, 0)); return; } @@ -538,8 +538,8 @@ namespace detail if (streambuf_.size() == streambuf_.max_size()) { std::size_t bytes = 0; - boost::system::error_code ec(error::not_found); - handler_(ec, bytes); + boost::system::error_code ec2(error::not_found); + handler_(ec2, bytes); return; } @@ -610,7 +610,7 @@ void async_read_until(AsyncReadStream& s, // Full match. We're done. boost::system::error_code ec; std::size_t bytes = result.first - begin + delim.length(); - s.io_service().post(detail::bind_handler(handler, ec, bytes)); + s.get_io_service().post(detail::bind_handler(handler, ec, bytes)); return; } else @@ -629,7 +629,7 @@ void async_read_until(AsyncReadStream& s, if (b.size() == b.max_size()) { boost::system::error_code ec(error::not_found); - s.io_service().post(detail::bind_handler(handler, ec, 0)); + s.get_io_service().post(detail::bind_handler(handler, ec, 0)); return; } @@ -783,7 +783,7 @@ void async_read_until(AsyncReadStream& s, // Full match. We're done. boost::system::error_code ec; std::size_t bytes = match_results[0].second - begin; - s.io_service().post(detail::bind_handler(handler, ec, bytes)); + s.get_io_service().post(detail::bind_handler(handler, ec, bytes)); return; } else @@ -802,7 +802,7 @@ void async_read_until(AsyncReadStream& s, if (b.size() == b.max_size()) { boost::system::error_code ec(error::not_found); - s.io_service().post(detail::bind_handler(handler, ec, 0)); + s.get_io_service().post(detail::bind_handler(handler, ec, 0)); return; } @@ -958,7 +958,7 @@ void async_read_until(AsyncReadStream& s, // Full match. We're done. boost::system::error_code ec; std::size_t bytes = result.first - begin; - s.io_service().post(detail::bind_handler(handler, ec, bytes)); + s.get_io_service().post(detail::bind_handler(handler, ec, bytes)); return; } else @@ -977,7 +977,7 @@ void async_read_until(AsyncReadStream& s, if (b.size() == b.max_size()) { boost::system::error_code ec(error::not_found); - s.io_service().post(detail::bind_handler(handler, ec, 0)); + s.get_io_service().post(detail::bind_handler(handler, ec, 0)); return; }