Author: cgutman
Date: Sat Apr 18 21:00:54 2009
New Revision: 40585
URL:
http://svn.reactos.org/svn/reactos?rev=40585&view=rev
Log:
- Return a better status for STATUS_CANCELLED, STATUS_FILE_CLOSED, and
STATUS_REMOTE_NOT_LISTENING
Modified:
trunk/reactos/dll/win32/msafd/misc/dllmain.c
Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Sat Apr 18 21:00:54 2009
@@ -320,6 +320,7 @@
if( ReturnedBytes )
*ReturnedBytes = Received;
break;
+ case STATUS_FILE_CLOSED:
case STATUS_END_OF_FILE:
*Errno = WSAESHUTDOWN;
break;
@@ -342,24 +343,20 @@
break;
case STATUS_REMOTE_NOT_LISTENING:
DbgPrint("MSAFD: STATUS_REMOTE_NOT_LISTENING\n");
- *Errno = WSAECONNRESET;
+ *Errno = WSAECONNREFUSED;
break;
case STATUS_NETWORK_UNREACHABLE:
DbgPrint("MSAFD: STATUS_NETWORK_UNREACHABLE\n");
*Errno = WSAENETUNREACH;
break;
- case STATUS_FILE_CLOSED:
- DbgPrint("MSAFD: STATUS_FILE_CLOSED\n");
- *Errno = WSAENOTSOCK;
- break;
case STATUS_INVALID_PARAMETER:
DbgPrint("MSAFD: STATUS_INVALID_PARAMETER\n");
*Errno = WSAEINVAL;
break;
- case STATUS_CANCELLED:
- DbgPrint("MSAFD: STATUS_CANCELLED\n");
- *Errno = WSAENOTSOCK;
- break;
+ case STATUS_CANCELLED:
+ DbgPrint("MSAFD: STATUS_CANCELLED\n");
+ *Errno = WSA_OPERATION_ABORTED;
+ break;
default:
DbgPrint("MSAFD: Error %x is unknown\n", Status);
*Errno = WSAEINVAL;