diff options
Diffstat (limited to '3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_handle_service.ipp')
-rw-r--r-- | 3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_handle_service.ipp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_handle_service.ipp b/3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_handle_service.ipp index ecd45c0..04a6791 100644 --- a/3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_handle_service.ipp +++ b/3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_handle_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_handle_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -46,7 +46,8 @@ public: // As documented in GetQueuedCompletionStatus, setting the low order // bit of this event prevents our synchronous writes from being treated // as completion port events. - *reinterpret_cast<DWORD_PTR*>(&hEvent) |= 1; + DWORD_PTR tmp = reinterpret_cast<DWORD_PTR>(hEvent); + hEvent = reinterpret_cast<HANDLE>(tmp | 1); } else { @@ -293,7 +294,7 @@ boost::system::error_code win_iocp_handle_service::cancel( } size_t win_iocp_handle_service::do_write( - win_iocp_handle_service::implementation_type& impl, boost::uint64_t offset, + win_iocp_handle_service::implementation_type& impl, uint64_t offset, const boost::asio::const_buffer& buffer, boost::system::error_code& ec) { if (!is_open(impl)) @@ -349,7 +350,7 @@ size_t win_iocp_handle_service::do_write( } void win_iocp_handle_service::start_write_op( - win_iocp_handle_service::implementation_type& impl, boost::uint64_t offset, + win_iocp_handle_service::implementation_type& impl, uint64_t offset, const boost::asio::const_buffer& buffer, operation* op) { update_cancellation_thread_id(impl); @@ -387,7 +388,7 @@ void win_iocp_handle_service::start_write_op( } size_t win_iocp_handle_service::do_read( - win_iocp_handle_service::implementation_type& impl, boost::uint64_t offset, + win_iocp_handle_service::implementation_type& impl, uint64_t offset, const boost::asio::mutable_buffer& buffer, boost::system::error_code& ec) { if (!is_open(impl)) @@ -449,7 +450,7 @@ size_t win_iocp_handle_service::do_read( ec = boost::system::error_code(last_error, boost::asio::error::get_system_category()); } - return 0; + return (last_error == ERROR_MORE_DATA) ? bytes_transferred : 0; } ec = boost::system::error_code(); @@ -457,7 +458,7 @@ size_t win_iocp_handle_service::do_read( } void win_iocp_handle_service::start_read_op( - win_iocp_handle_service::implementation_type& impl, boost::uint64_t offset, + win_iocp_handle_service::implementation_type& impl, uint64_t offset, const boost::asio::mutable_buffer& buffer, operation* op) { update_cancellation_thread_id(impl); |