diff options
Diffstat (limited to '3rdParty/Boost/src/boost/asio/detail/win_iocp_overlapped_ptr.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/asio/detail/win_iocp_overlapped_ptr.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/3rdParty/Boost/src/boost/asio/detail/win_iocp_overlapped_ptr.hpp b/3rdParty/Boost/src/boost/asio/detail/win_iocp_overlapped_ptr.hpp index e8ab6b0..bb64014 100644 --- a/3rdParty/Boost/src/boost/asio/detail/win_iocp_overlapped_ptr.hpp +++ b/3rdParty/Boost/src/boost/asio/detail/win_iocp_overlapped_ptr.hpp @@ -2,7 +2,7 @@ // win_iocp_overlapped_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -92,6 +92,9 @@ public: // Release ownership of the OVERLAPPED object. OVERLAPPED* release() { + if (ptr_) + ptr_->on_pending(); + OVERLAPPED* tmp = ptr_; ptr_ = 0; return tmp; @@ -104,8 +107,7 @@ public: if (ptr_) { ptr_->ec_ = ec; - ptr_->io_service_.post_completion(ptr_, 0, - static_cast<DWORD>(bytes_transferred)); + ptr_->on_immediate_completion(0, static_cast<DWORD>(bytes_transferred)); ptr_ = 0; } } @@ -171,7 +173,7 @@ private: // Make the upcall. boost_asio_handler_invoke_helpers::invoke( - bind_handler(handler, ec, bytes_transferred), &handler); + bind_handler(handler, ec, bytes_transferred), handler); } static void destroy_impl(win_iocp_io_service::operation* op) |