Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c368df48
Commit
c368df48
authored
Oct 12, 2011
by
Bernhard Loos
Committed by
Alexandre Julliard
Oct 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: PIPE_TYPE_BYTE | PIPE_READMODE_MESSAGE is invalid for named pipes.
parent
fea69b23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
pipe.c
dlls/kernel32/tests/pipe.c
+13
-0
named_pipe.c
server/named_pipe.c
+2
-1
No files found.
dlls/kernel32/tests/pipe.c
View file @
c368df48
...
...
@@ -71,6 +71,19 @@ static void test_CreateNamedPipe(int pipemode)
ok
(
hnp
==
INVALID_HANDLE_VALUE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"CreateNamedPipe should fail if name doesn't start with
\\\\
.
\\
pipe
\n
"
);
if
(
pipemode
==
PIPE_TYPE_BYTE
)
{
/* Bad parameter checks */
hnp
=
CreateNamedPipe
(
PIPENAME
,
PIPE_ACCESS_DUPLEX
,
PIPE_TYPE_BYTE
|
PIPE_READMODE_MESSAGE
,
/* nMaxInstances */
1
,
/* nOutBufSize */
1024
,
/* nInBufSize */
1024
,
/* nDefaultWait */
NMPWAIT_USE_DEFAULT_WAIT
,
/* lpSecurityAttrib */
NULL
);
ok
(
hnp
==
INVALID_HANDLE_VALUE
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"CreateNamedPipe should fail with PIPE_TYPE_BYTE | PIPE_READMODE_MESSAGE
\n
"
);
}
hnp
=
CreateNamedPipe
(
NULL
,
PIPE_ACCESS_DUPLEX
,
pipemode
|
PIPE_WAIT
,
1
,
1024
,
1024
,
NMPWAIT_USE_DEFAULT_WAIT
,
NULL
);
...
...
server/named_pipe.c
View file @
c368df48
...
...
@@ -950,7 +950,8 @@ DECL_HANDLER(create_named_pipe)
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
if
(
!
req
->
sharing
||
(
req
->
sharing
&
~
(
FILE_SHARE_READ
|
FILE_SHARE_WRITE
)))
if
(
!
req
->
sharing
||
(
req
->
sharing
&
~
(
FILE_SHARE_READ
|
FILE_SHARE_WRITE
))
||
(
!
(
req
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_WRITE
)
&&
(
req
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_READ
)))
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment