- Add more cases to TCPTranslateError
authorCameron Gutman <aicommander@gmail.com>
Sat, 31 Oct 2009 07:34:27 +0000 (07:34 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sat, 31 Oct 2009 07:34:27 +0000 (07:34 +0000)
 - Fix a header typo

svn path=/trunk/; revision=43867

reactos/lib/drivers/ip/transport/tcp/tcp.c
reactos/lib/drivers/oskittcp/include/oskiterrno.h

index 5500db0..e195ff5 100644 (file)
@@ -563,8 +563,16 @@ NTSTATUS TCPTranslateError( int OskitError ) {
     case OSK_EAFNOSUPPORT: Status = STATUS_INVALID_CONNECTION; break;
     case OSK_ECONNREFUSED:
     case OSK_ECONNRESET: Status = STATUS_REMOTE_NOT_LISTENING; break;
-    case OSK_EINPROGRESS:
-    case OSK_EAGAIN: Status = STATUS_PENDING; break;
+    case OSK_EINPROGRESS: Status = STATUS_PENDING; break;
+    case OSK_EWOULDBLOCK: Status = STATUS_CANT_WAIT; break;
+    case OSK_EINVAL: Status = STATUS_INVALID_PARAMETER; break;
+    case OSK_ENOMEM:
+    case OSK_ENOBUFS: Status = STATUS_INSUFFICIENT_RESOURCES; break;
+    case OSK_ESHUTDOWN: Status = STATUS_FILE_CLOSED; break;
+    case OSK_EMSGSIZE: Status = STATUS_BUFFER_TOO_SMALL; break;
+    case OSK_ETIMEDOUT: Status = STATUS_TIMEOUT; break;
+    case OSK_ENETUNREACH: Status = STATUS_NETWORK_UNREACHABLE; break;
+    case OSK_EFAULT: Status = STATUS_ACCESS_VIOLATION; break;
     default:
        DbgPrint("OskitTCP returned unhandled error code: %d\n", OskitError);
        Status = STATUS_INVALID_CONNECTION;
index 5bd379f..f6b68e7 100644 (file)
@@ -97,7 +97,7 @@ extern int errno;                     /* global error number */
 /* non-blocking and interrupt i/o */
 #define        OSK_EAGAIN              35              /* Resource temporarily unavailable */
 #ifndef _POSIX_SOURCE
-#define        OSK_EWOULDBLOCK EAGAIN          /* Operation would block */
+#define        OSK_EWOULDBLOCK OSK_EAGAIN              /* Operation would block */
 #define        OSK_EINPROGRESS 36              /* Operation now in progress */
 #define        OSK_EALREADY    37              /* Operation already in progress */