* fhandler_serial.cc (fhandler_serial::raw_read): Check for

ERROR_OPERATION_ABORTED rather than ERROR_IO_INCOMPLETE after CancelIo.
This commit is contained in:
Corinna Vinschen 2012-05-25 11:08:10 +00:00
parent 96d5b7d17c
commit df5cda0e93
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-05-25 Corinna Vinschen <corinna@vinschen.de>
* fhandler_serial.cc (fhandler_serial::raw_read): Check for
ERROR_OPERATION_ABORTED rather than ERROR_IO_INCOMPLETE after CancelIo.
2012-05-25 Corinna Vinschen <corinna@vinschen.de> 2012-05-25 Corinna Vinschen <corinna@vinschen.de>
* fhandler_serial.cc (fhandler_serial::raw_read): Just call ReadFile * fhandler_serial.cc (fhandler_serial::raw_read): Just call ReadFile

View File

@ -128,7 +128,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
CancelIo (get_handle ()); CancelIo (get_handle ());
if (GetOverlappedResult (get_handle (), &io_status, &n, FALSE)) if (GetOverlappedResult (get_handle (), &io_status, &n, FALSE))
tot = n; tot = n;
else if (GetLastError () != ERROR_IO_INCOMPLETE) else if (GetLastError () != ERROR_OPERATION_ABORTED)
goto err; goto err;
if (tot == 0) if (tot == 0)
{ {