Fix error returned when opening nonexistent pipes.
This commit is contained in:
parent
3f85e26af2
commit
f2686d4620
|
@ -127,13 +127,13 @@ void test_namespace_pipe(void)
|
||||||
pRtlInitUnicodeString(&str, buffer3);
|
pRtlInitUnicodeString(&str, buffer3);
|
||||||
InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
|
InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
|
||||||
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
|
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);
|
"pNtOpenFile should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08lx)\n", status);
|
||||||
|
|
||||||
pRtlInitUnicodeString(&str, buffer4);
|
pRtlInitUnicodeString(&str, buffer4);
|
||||||
InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL);
|
InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL);
|
||||||
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
|
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);
|
"pNtOpenFile should have failed with STATUS_OBJECT_NAME_NOT_FOUND got(%08lx)\n", status);
|
||||||
|
|
||||||
pNtClose(pipe);
|
pNtClose(pipe);
|
||||||
|
|
|
@ -598,12 +598,8 @@ DECL_HANDLER(open_named_pipe)
|
||||||
struct named_pipe *pipe;
|
struct named_pipe *pipe;
|
||||||
int fds[2];
|
int fds[2];
|
||||||
|
|
||||||
pipe = open_named_pipe( get_req_data(), get_req_data_size(), req->attributes );
|
if (!(pipe = open_named_pipe( get_req_data(), get_req_data_size(), req->attributes )))
|
||||||
if (!pipe)
|
|
||||||
{
|
|
||||||
set_error( STATUS_NO_SUCH_FILE );
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
server = find_server2( pipe, ps_idle_server, ps_wait_open );
|
server = find_server2( pipe, ps_idle_server, ps_wait_open );
|
||||||
release_object( pipe );
|
release_object( pipe );
|
||||||
|
|
Loading…
Reference in New Issue