mirror of
https://github.com/reactos/reactos.git
synced 2024-09-03 17:19:20 +00:00
* Properly handle STATUS_TIMEOUT
* Don't crash if STATUS_END_OF_FILE and a NULL ReturnedBytes are passed * Handle STATUS_INVALID_CONNECTION svn path=/branches/aicom-network-fixes/; revision=34997
This commit is contained in:
parent
c501d8112c
commit
0940a5b301
|
@ -279,17 +279,17 @@ DWORD MsafdReturnWithErrno( NTSTATUS Status, LPINT Errno, DWORD Received,
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue