Author: cgutman
Date: Fri Aug 1 07:06:19 2008
New Revision: 34997
URL:
http://svn.reactos.org/svn/reactos?rev=34997&view=rev
Log:
* Properly handle STATUS_TIMEOUT
* Don't crash if STATUS_END_OF_FILE and a NULL ReturnedBytes are passed
* Handle STATUS_INVALID_CONNECTION
Modified:
branches/aicom-network-fixes/dll/win32/msafd/misc/dllmain.c
Modified: branches/aicom-network-fixes/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/dll/win32/m…
==============================================================================
--- branches/aicom-network-fixes/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Fri Aug 1
07:06:19 2008
@@ -279,17 +279,17 @@
if( Errno ) {
switch (Status) {
case STATUS_CANT_WAIT: *Errno = WSAEWOULDBLOCK; break;
- case STATUS_TIMEOUT:
+ case STATUS_TIMEOUT: *Errno = WSAETIMEDOUT; break;
case STATUS_SUCCESS:
/* Return Number of bytes Read */
if( ReturnedBytes ) *ReturnedBytes = Received; break;
- case STATUS_END_OF_FILE: *Errno = WSAESHUTDOWN; *ReturnedBytes = 0; break;
+ case STATUS_END_OF_FILE: *Errno = WSAESHUTDOWN; break;
case STATUS_PENDING: *Errno = WSA_IO_PENDING; break;
case STATUS_BUFFER_OVERFLOW: *Errno = WSAEMSGSIZE; break;
- default: {
+ case STATUS_INVALID_CONNECTION: *Errno = WSAEAFNOSUPPORT; break;
+ default:
DbgPrint("MSAFD: Error %x is unknown\n", Status);
*Errno = WSAEINVAL; break;
- } break;
}
}