Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
290320a8
Commit
290320a8
authored
Aug 17, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use pipe_end state in FSCTL_PIPE_LISTEN implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd1c681e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
18 deletions
+24
-18
pipe.c
dlls/ntdll/tests/pipe.c
+8
-0
named_pipe.c
server/named_pipe.c
+16
-18
No files found.
dlls/ntdll/tests/pipe.c
View file @
290320a8
...
...
@@ -1341,6 +1341,14 @@ static void test_pipe_state(HANDLE pipe, BOOL is_server, DWORD state)
ok
(
status
==
expected_status
,
"NtReadFile failed in %s state %u: %x
\n
"
,
is_server
?
"server"
:
"client"
,
state
,
status
);
}
if
(
is_server
&&
(
state
==
FILE_PIPE_CLOSING_STATE
||
state
==
FILE_PIPE_CONNECTED_STATE
))
{
memset
(
&
io
,
0xcc
,
sizeof
(
io
));
status
=
listen_pipe
(
pipe
,
NULL
,
&
io
,
FALSE
);
ok
(
status
==
(
state
==
FILE_PIPE_CLOSING_STATE
?
STATUS_PIPE_CLOSING
:
STATUS_PIPE_CONNECTED
),
"status = %x in %u state
\n
"
,
status
,
state
);
}
}
static
void
test_pipe_with_data_state
(
HANDLE
pipe
,
BOOL
is_server
,
DWORD
state
)
...
...
server/named_pipe.c
View file @
290320a8
...
...
@@ -990,27 +990,25 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
switch
(
code
)
{
case
FSCTL_PIPE_LISTEN
:
switch
(
server
->
state
)
switch
(
server
->
pipe_end
.
state
)
{
case
ps_idle_server
:
case
ps_wait_connect
:
fd_queue_async
(
server
->
pipe_end
.
fd
,
async
,
ASYNC_TYPE_WAIT
);
server
->
pipe_end
.
state
=
FILE_PIPE_LISTENING_STATE
;
set_server_state
(
server
,
ps_wait_open
);
async_wake_up
(
&
server
->
pipe_end
.
pipe
->
waiters
,
STATUS_SUCCESS
);
set_error
(
STATUS_PENDING
);
return
1
;
case
ps_connected_server
:
set_error
(
STATUS_PIPE_CONNECTED
);
break
;
case
ps_wait_disconnect
:
set_error
(
STATUS_NO_DATA_DETECTED
);
break
;
case
ps_wait_open
:
set_error
(
STATUS_INVALID_HANDLE
);
case
FILE_PIPE_LISTENING_STATE
:
case
FILE_PIPE_DISCONNECTED_STATE
:
break
;
case
FILE_PIPE_CONNECTED_STATE
:
set_error
(
STATUS_PIPE_CONNECTED
);
return
0
;
case
FILE_PIPE_CLOSING_STATE
:
set_error
(
STATUS_PIPE_CLOSING
);
return
0
;
}
return
0
;
fd_queue_async
(
server
->
pipe_end
.
fd
,
async
,
ASYNC_TYPE_WAIT
);
server
->
pipe_end
.
state
=
FILE_PIPE_LISTENING_STATE
;
set_server_state
(
server
,
ps_wait_open
);
async_wake_up
(
&
server
->
pipe_end
.
pipe
->
waiters
,
STATUS_SUCCESS
);
set_error
(
STATUS_PENDING
);
return
1
;
case
FSCTL_PIPE_DISCONNECT
:
switch
(
server
->
state
)
...
...
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