From c2faf4278d7da9b46d7f1e7cd9e0b0936964ea0f Mon Sep 17 00:00:00 2001 From: chris_kohlhoff Date: Thu, 21 Aug 2008 12:26:46 +0000 Subject: [PATCH] Use get_io_service() rather than the deprecated io_service() call. --- asio/include/asio/impl/read_until.ipp | 16 ++++++++-------- asio/src/tests/unit/read_until.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/asio/include/asio/impl/read_until.ipp b/asio/include/asio/impl/read_until.ipp index ce93f1a4..dffd3120 100644 --- a/asio/include/asio/impl/read_until.ipp +++ b/asio/include/asio/impl/read_until.ipp @@ -448,7 +448,7 @@ void async_read_until(AsyncReadStream& s, // Found a match. We're done. asio::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; } @@ -456,7 +456,7 @@ void async_read_until(AsyncReadStream& s, if (b.size() == b.max_size()) { asio::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; } @@ -609,7 +609,7 @@ void async_read_until(AsyncReadStream& s, // Full match. We're done. asio::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 @@ -628,7 +628,7 @@ void async_read_until(AsyncReadStream& s, if (b.size() == b.max_size()) { asio::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; } @@ -782,7 +782,7 @@ void async_read_until(AsyncReadStream& s, // Full match. We're done. asio::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 @@ -801,7 +801,7 @@ void async_read_until(AsyncReadStream& s, if (b.size() == b.max_size()) { asio::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; } @@ -957,7 +957,7 @@ void async_read_until(AsyncReadStream& s, // Full match. We're done. asio::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 @@ -976,7 +976,7 @@ void async_read_until(AsyncReadStream& s, if (b.size() == b.max_size()) { asio::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; } diff --git a/asio/src/tests/unit/read_until.cpp b/asio/src/tests/unit/read_until.cpp index 67d1ebef..19218c2c 100644 --- a/asio/src/tests/unit/read_until.cpp +++ b/asio/src/tests/unit/read_until.cpp @@ -36,7 +36,7 @@ public: { } - io_service_type& io_service() + io_service_type& get_io_service() { return io_service_; }