Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52419 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2009-04-16 08:31:29


Author: chris_kohlhoff
Date: 2009-04-16 08:31:27 EDT (Thu, 16 Apr 2009)
New Revision: 52419
URL: http://svn.boost.org/trac/boost/changeset/52419

Log:
Specifically handle the case when an overlapped ReadFile call fails with
ERROR_MORE_DATA. This enables a hack where a windows::stream_handle can be
used with a message-oriented named pipe.

Text files modified:
   trunk/boost/asio/detail/win_iocp_handle_service.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/boost/asio/detail/win_iocp_handle_service.hpp
==============================================================================
--- trunk/boost/asio/detail/win_iocp_handle_service.hpp (original)
+++ trunk/boost/asio/detail/win_iocp_handle_service.hpp 2009-04-16 08:31:27 EDT (Thu, 16 Apr 2009)
@@ -573,7 +573,7 @@
     if (!ok)
     {
       DWORD last_error = ::GetLastError();
- if (last_error != ERROR_IO_PENDING)
+ if (last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA)
       {
         if (last_error == ERROR_HANDLE_EOF)
         {
@@ -763,7 +763,7 @@
         static_cast<DWORD>(boost::asio::buffer_size(buffer)),
         &bytes_transferred, ptr.get());
     DWORD last_error = ::GetLastError();
- if (!ok && last_error != ERROR_IO_PENDING)
+ if (!ok && last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA)
     {
       boost::asio::io_service::work work(this->get_io_service());
       ptr.reset();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk