Patch: sock-shutdown-file.diff (11 in series)
Martin Wilck
Martin.Wilck at fujitsu-siemens.com
Fri Apr 12 10:25:35 CDT 2002
Patch: sock-shutdown-file.diff
Enables error handling if ReadFile() WriteFile() are called on a socket
after the respective channel of the socket was shut down.
Patch against: CVS 2002-04-12, with my previously submitted patches applied.
Modified files:
files: file.c
--- TMP/wine/files/file.c Fri Apr 12 11:54:50 2002
+++ MW/wine/files/file.c Fri Apr 12 11:54:28 2002
@@ -1514,6 +1514,16 @@
SetLastError ( ERROR_INVALID_PARAMETER );
return FALSE;
}
+ if ( ! (flags & FD_FLAG_OVERLAPPED) ) {
+ WARN ( "fd is not overlapped\n" );
+ SetLastError ( ERROR_INVALID_PARAMETER );
+ goto error;
+ }
+ if ( flags & FD_FLAG_RECV_SHUTDOWN ) {
+ /* Fixme: WSAESHUTDOWN is unavailable */
+ SetLastError ( ERROR_BROKEN_PIPE );
+ goto error;
+ }
ovp = (async_fileio*) HeapAlloc(GetProcessHeap(), 0, sizeof (async_fileio));
if(!ovp)
@@ -1730,6 +1740,16 @@
{
TRACE( "Couldn't get FD\n" );
return FALSE;
+ }
+ if ( ! (flags & FD_FLAG_OVERLAPPED) ) {
+ WARN ( "fd is not overlapped\n" );
+ SetLastError ( ERROR_INVALID_PARAMETER );
+ goto error;
+ }
+ if ( flags & FD_FLAG_SEND_SHUTDOWN ) {
+ /* Fixme: WSAESHUTDOWN is unavailable */
+ SetLastError ( ERROR_BROKEN_PIPE );
+ goto error;
}
ovp = (async_fileio*) HeapAlloc(GetProcessHeap(), 0, sizeof (async_fileio));
More information about the wine-devel
mailing list