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
0973b8d2
Commit
0973b8d2
authored
Aug 08, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Improve FSCTL_PIPE_PEEK error handling.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8e5bc0da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
pipe.c
dlls/kernel32/tests/pipe.c
+0
-2
pipe.c
dlls/ntdll/tests/pipe.c
+2
-2
named_pipe.c
server/named_pipe.c
+8
-1
No files found.
dlls/kernel32/tests/pipe.c
View file @
0973b8d2
...
...
@@ -214,7 +214,6 @@ static void test_CreateNamedPipe(int pipemode)
test_signaled
(
hnp
);
ret
=
PeekNamedPipe
(
hnp
,
NULL
,
0
,
NULL
,
&
readden
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_BAD_PIPE
,
"PeekNamedPipe returned %x (%u)
\n
"
,
ret
,
GetLastError
());
...
...
@@ -1463,7 +1462,6 @@ static int test_DisconnectNamedPipe(void)
ok
(
!
ret
&&
GetLastError
()
==
ERROR_PIPE_NOT_CONNECTED
,
"PeekNamedPipe returned %x (%u)
\n
"
,
ret
,
GetLastError
());
ret
=
PeekNamedPipe
(
hnp
,
NULL
,
0
,
NULL
,
&
readden
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_BAD_PIPE
,
"PeekNamedPipe returned %x (%u)
\n
"
,
ret
,
GetLastError
());
ok
(
CloseHandle
(
hFile
),
"CloseHandle
\n
"
);
...
...
dlls/ntdll/tests/pipe.c
View file @
0973b8d2
...
...
@@ -1286,7 +1286,7 @@ static void test_pipe_state(HANDLE pipe, BOOL is_server, DWORD state)
expected_status
=
STATUS_PIPE_BROKEN
;
break
;
}
todo_wine_if
(
expected_status
&&
expected_status
!=
STATUS_PIPE_BROKEN
)
todo_wine_if
(
expected_status
==
STATUS_BUFFER_OVERFLOW
||
expected_status
==
STATUS_PIPE_DISCONNECTED
)
ok
(
status
==
expected_status
,
"status = %x, expected %x in %s state %u
\n
"
,
status
,
expected_status
,
is_server
?
"server"
:
"client"
,
state
);
if
(
!
status
)
...
...
@@ -1397,7 +1397,7 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state)
expected_status
=
STATUS_BUFFER_OVERFLOW
;
break
;
}
todo_wine
todo_wine
_if
(
expected_status
==
STATUS_BUFFER_OVERFLOW
||
expected_status
==
STATUS_PIPE_DISCONNECTED
)
ok
(
status
==
expected_status
,
"status = %x, expected %x in %s state %u
\n
"
,
status
,
expected_status
,
is_server
?
"server"
:
"client"
,
state
);
if
(
status
==
STATUS_BUFFER_OVERFLOW
)
...
...
server/named_pipe.c
View file @
0973b8d2
...
...
@@ -868,10 +868,17 @@ static int pipe_end_peek( struct pipe_end *pipe_end )
}
reply_size
-=
offsetof
(
FILE_PIPE_PEEK_BUFFER
,
Data
);
if
(
!
pipe_end
->
connection
&&
list_empty
(
&
pipe_end
->
message_queue
)
)
switch
(
pipe_end
->
state
)
{
case
FILE_PIPE_CONNECTED_STATE
:
break
;
case
FILE_PIPE_CLOSING_STATE
:
if
(
!
list_empty
(
&
pipe_end
->
message_queue
))
break
;
set_error
(
STATUS_PIPE_BROKEN
);
return
0
;
default:
set_error
(
STATUS_INVALID_PIPE_STATE
);
return
0
;
}
LIST_FOR_EACH_ENTRY
(
message
,
&
pipe_end
->
message_queue
,
struct
pipe_message
,
entry
)
...
...
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