Commit 4d6d580b authored by Etaash Mathamsetty's avatar Etaash Mathamsetty Committed by Alexandre Julliard

ntdll: Allow NULL timeout in NtCreateNamedPipeFile.

parent 7d2bd1e4
...@@ -412,6 +412,16 @@ static void test_name_collisions(void) ...@@ -412,6 +412,16 @@ static void test_name_collisions(void)
ok( iosb.Information == FILE_OPENED, "wrong info %Ix\n", iosb.Information ); ok( iosb.Information == FILE_OPENED, "wrong info %Ix\n", iosb.Information );
pNtClose(h1); pNtClose(h1);
memset( &iosb, 0xcc, sizeof(iosb) );
status = pNtCreateNamedPipeFile( &h1, GENERIC_READ|GENERIC_WRITE, &attr, &iosb,
FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OPEN_IF, FILE_PIPE_FULL_DUPLEX,
FALSE, FALSE, FALSE, 10, 256, 256, NULL );
ok(status == STATUS_SUCCESS, "failed to create pipe %08lx\n", status);
ok( iosb.Status == STATUS_SUCCESS, "wrong status %08lx\n", status);
ok( iosb.Information == FILE_OPENED, "wrong info %Ix\n", iosb.Information );
pNtClose(h1);
h1 = CreateNamedPipeA( "\\\\.\\pipe\\named_pipe", PIPE_ACCESS_DUPLEX, h1 = CreateNamedPipeA( "\\\\.\\pipe\\named_pipe", PIPE_ACCESS_DUPLEX,
PIPE_READMODE_BYTE, 10, 256, 256, 1000, NULL ); PIPE_READMODE_BYTE, 10, 256, 256, 1000, NULL );
winerr = GetLastError(); winerr = GetLastError();
......
...@@ -4132,7 +4132,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR ...@@ -4132,7 +4132,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR
(int)inbound_quota, (int)outbound_quota, timeout ); (int)inbound_quota, (int)outbound_quota, timeout );
/* assume we only get relative timeout */ /* assume we only get relative timeout */
if (timeout->QuadPart > 0) FIXME( "Wrong time %s\n", wine_dbgstr_longlong(timeout->QuadPart) ); if (timeout && timeout->QuadPart > 0) FIXME( "Wrong time %s\n", wine_dbgstr_longlong(timeout->QuadPart) );
if ((status = alloc_object_attributes( attr, &objattr, &len ))) return status; if ((status = alloc_object_attributes( attr, &objattr, &len ))) return status;
...@@ -4149,7 +4149,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR ...@@ -4149,7 +4149,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR
req->maxinstances = max_inst; req->maxinstances = max_inst;
req->outsize = outbound_quota; req->outsize = outbound_quota;
req->insize = inbound_quota; req->insize = inbound_quota;
req->timeout = timeout->QuadPart; req->timeout = timeout ? timeout->QuadPart : 0ULL;
wine_server_add_data( req, objattr, len ); wine_server_add_data( req, objattr, len );
if (!(status = wine_server_call( req ))) if (!(status = wine_server_call( req )))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment