mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 16:23:37 +00:00
server: Only the sharing parameter of two instances of the same pipe have to match.
This commit is contained in:
parent
039bacb0c9
commit
5098b13177
|
@ -374,7 +374,7 @@ static void test_CreateNamedPipe_instances_must_match(void)
|
|||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
|
||||
|
||||
hnp2 = CreateNamedPipe(PIPENAME, PIPE_ACCESS_INBOUND, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nMaxInstances */ 2,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
|
@ -384,7 +384,25 @@ static void test_CreateNamedPipe_instances_must_match(void)
|
|||
|
||||
ok(CloseHandle(hnp), "CloseHandle\n");
|
||||
|
||||
/* etc, etc */
|
||||
/* check everything else */
|
||||
hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 4,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
|
||||
|
||||
hnp2 = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE,
|
||||
/* nMaxInstances */ 3,
|
||||
/* nOutBufSize */ 102,
|
||||
/* nInBufSize */ 24,
|
||||
/* nDefaultWait */ 1234,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp2 != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
|
||||
|
||||
ok(CloseHandle(hnp), "CloseHandle\n");
|
||||
ok(CloseHandle(hnp2), "CloseHandle\n");
|
||||
}
|
||||
|
||||
/** implementation of alarm() */
|
||||
|
|
|
@ -971,9 +971,7 @@ DECL_HANDLER(create_named_pipe)
|
|||
release_object( pipe );
|
||||
return;
|
||||
}
|
||||
if ((pipe->maxinstances != req->maxinstances) ||
|
||||
(pipe->timeout != req->timeout) ||
|
||||
(pipe->flags != req->flags))
|
||||
if (pipe->sharing != req->sharing)
|
||||
{
|
||||
set_error( STATUS_ACCESS_DENIED );
|
||||
release_object( pipe );
|
||||
|
|
Loading…
Reference in a new issue