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
29be7376
Commit
29be7376
authored
Nov 23, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Properly handle disconnected pipe in set_named_pipe_info request.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5c23f335
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
pipe.c
dlls/ntdll/tests/pipe.c
+14
-1
named_pipe.c
server/named_pipe.c
+5
-1
No files found.
dlls/ntdll/tests/pipe.c
View file @
29be7376
...
...
@@ -2042,7 +2042,7 @@ static HANDLE connect_pipe_reader(HANDLE server)
{
HANDLE
client
;
client
=
CreateFileW
(
testpipe
,
GENERIC_READ
,
0
,
0
,
OPEN_EXISTING
,
client
=
CreateFileW
(
testpipe
,
GENERIC_READ
|
FILE_WRITE_ATTRIBUTES
,
0
,
0
,
OPEN_EXISTING
,
FILE_FLAG_OVERLAPPED
,
0
);
ok
(
client
!=
INVALID_HANDLE_VALUE
,
"can't open pipe: %u
\n
"
,
GetLastError
());
...
...
@@ -2146,6 +2146,19 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
ok
(
pipe_info
.
ReadMode
==
0
,
"ReadMode = %u
\n
"
,
pipe_info
.
ReadMode
);
ok
(
pipe_info
.
CompletionMode
==
0
,
"CompletionMode = %u
\n
"
,
pipe_info
.
CompletionMode
);
}
pipe_info
.
ReadMode
=
0
;
pipe_info
.
CompletionMode
=
0
;
memset
(
&
iosb
,
0xcc
,
sizeof
(
iosb
));
status
=
pNtSetInformationFile
(
pipe
,
&
iosb
,
&
pipe_info
,
sizeof
(
pipe_info
),
FilePipeInformation
);
if
(
!
is_server
&&
state
==
FILE_PIPE_DISCONNECTED_STATE
)
ok
(
status
==
STATUS_PIPE_DISCONNECTED
,
"NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x
\n
"
,
is_server
?
"server"
:
"client"
,
state
,
status
);
else
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x
\n
"
,
is_server
?
"server"
:
"client"
,
state
,
status
);
}
static
void
test_file_info
(
void
)
...
...
server/named_pipe.c
View file @
29be7376
...
...
@@ -1427,7 +1427,11 @@ DECL_HANDLER(set_named_pipe_info)
if
(
!
pipe_end
)
return
;
}
if
((
req
->
flags
&
~
(
NAMED_PIPE_MESSAGE_STREAM_READ
|
NAMED_PIPE_NONBLOCKING_MODE
))
||
if
(
!
pipe_end
->
pipe
)
{
set_error
(
STATUS_PIPE_DISCONNECTED
);
}
else
if
((
req
->
flags
&
~
(
NAMED_PIPE_MESSAGE_STREAM_READ
|
NAMED_PIPE_NONBLOCKING_MODE
))
||
((
req
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_READ
)
&&
!
(
pipe_end
->
pipe
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_WRITE
)))
{
set_error
(
STATUS_INVALID_PARAMETER
);
...
...
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