server: Fix return value for FSCTL_PIPE_WAIT if pipe does not exist.
This commit is contained in:
parent
2227abbc2c
commit
9602fa7a93
|
@ -60,6 +60,12 @@ static void test_CreateNamedPipe(int pipemode)
|
|||
trace("test_CreateNamedPipe starting in byte mode\n");
|
||||
else
|
||||
trace("test_CreateNamedPipe starting in message mode\n");
|
||||
|
||||
/* Wait for non existing pipe */
|
||||
ret = WaitNamedPipeA(PIPENAME, 2000);
|
||||
ok(ret == 0, "WaitNamedPipe returned %d for non existing pipe\n", ret);
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError());
|
||||
|
||||
/* Bad parameter checks */
|
||||
hnp = CreateNamedPipeA("not a named pipe", PIPE_ACCESS_DUPLEX, pipemode | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
|
|
|
@ -900,7 +900,7 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, c
|
|||
name.len = (buffer->NameLength / sizeof(WCHAR)) * sizeof(WCHAR);
|
||||
if (!(pipe = (struct named_pipe *)find_object( device->pipes, &name, OBJ_CASE_INSENSITIVE )))
|
||||
{
|
||||
set_error( STATUS_PIPE_NOT_AVAILABLE );
|
||||
set_error( STATUS_OBJECT_NAME_NOT_FOUND );
|
||||
return 0;
|
||||
}
|
||||
if (!(server = find_available_server( pipe )))
|
||||
|
|
Loading…
Reference in New Issue