commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r820604 - /commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c
Date Thu, 01 Oct 2009 11:01:16 GMT
Author: mturk
Date: Thu Oct  1 11:01:16 2009
New Revision: 820604

URL: http://svn.apache.org/viewvc?rev=820604&view=rev
Log:
Check for async close

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c?rev=820604&r1=820603&r2=820604&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c Thu Oct  1 11:01:16 2009
@@ -710,10 +710,10 @@
         }
         else {
             f->eof = 1;
-            return -1;
+            return  -1;
         }
     }
-    switch (rcr = GetLastError()) {
+    switch (rc = GetLastError()) {
         case ERROR_HANDLE_EOF:
         case ERROR_BROKEN_PIPE:
             rc     = 0;
@@ -750,7 +750,7 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-        case EBADF:
+        case ERROR_INVALID_HANDLE:
             ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
         break;
         default:
@@ -904,7 +904,7 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-        case EBADF:
+        case ERROR_INVALID_HANDLE:
             ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
         break;
         default:
@@ -1036,7 +1036,7 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-        case EBADF:
+        case ERROR_INVALID_HANDLE:
             ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
         break;
         default:
@@ -1173,7 +1173,7 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-        case EBADF:
+        case ERROR_INVALID_HANDLE:
             ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
         break;
         default:
@@ -1274,7 +1274,9 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;
@@ -1386,7 +1388,9 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;
@@ -1504,7 +1508,9 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;
@@ -1626,7 +1632,9 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;
@@ -1751,7 +1759,9 @@
         case ACR_TIMEUP:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;
@@ -1877,7 +1887,9 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;        
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;
@@ -2002,7 +2014,9 @@
         case ACR_TIMEUP:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;
@@ -2131,7 +2145,9 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;
@@ -2265,7 +2281,9 @@
         case ERROR_OPERATION_ABORTED:
             return 0;
         break;
-
+        case ERROR_INVALID_HANDLE:
+            ACR_THROW_EX_IF_ERR(ACR_EX_ACLOSED_DESC, rc);
+        break;
         default:
             ACR_THROW_IO_IF_ERR(f->err);
         break;



Mime
View raw message