Commit f2686d46 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

Fix error returned when opening nonexistent pipes.

parent 3f85e26a
......@@ -127,13 +127,13 @@ void test_namespace_pipe(void)
pRtlInitUnicodeString(&str, buffer3);
InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
todo_wine ok(status == STATUS_OBJECT_PATH_NOT_FOUND,
todo_wine ok(status == STATUS_OBJECT_PATH_NOT_FOUND || status == STATUS_PIPE_NOT_AVAILABLE,
"pNtOpenFile should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08lx)\n", status);
pRtlInitUnicodeString(&str, buffer4);
InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL);
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
todo_wine ok(status == STATUS_OBJECT_NAME_NOT_FOUND,
ok(status == STATUS_OBJECT_NAME_NOT_FOUND,
"pNtOpenFile should have failed with STATUS_OBJECT_NAME_NOT_FOUND got(%08lx)\n", status);
pNtClose(pipe);
......
......@@ -598,12 +598,8 @@ DECL_HANDLER(open_named_pipe)
struct named_pipe *pipe;
int fds[2];
pipe = open_named_pipe( get_req_data(), get_req_data_size(), req->attributes );
if (!pipe)
{
set_error( STATUS_NO_SUCH_FILE );
if (!(pipe = open_named_pipe( get_req_data(), get_req_data_size(), req->attributes )))
return;
}
server = find_server2( pipe, ps_idle_server, ps_wait_open );
release_object( pipe );
......
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