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
63a23725
Commit
63a23725
authored
May 03, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Allocate the wait event for FSCTL_PIPE_LISTEN on the server side.
parent
fd59e158
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
+31
-3
file.c
dlls/ntdll/file.c
+1
-1
named_pipe.c
server/named_pipe.c
+30
-2
No files found.
dlls/ntdll/file.c
View file @
63a23725
...
...
@@ -1075,7 +1075,6 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
if
(
!
status
)
status
=
DIR_unmount_device
(
handle
);
break
;
case
FSCTL_PIPE_LISTEN
:
case
FSCTL_PIPE_WAIT
:
{
HANDLE
internal_event
=
0
;
...
...
@@ -1173,6 +1172,7 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
status
=
STATUS_SUCCESS
;
break
;
case
FSCTL_PIPE_LISTEN
:
default:
status
=
server_ioctl_file
(
handle
,
event
,
apc
,
apc_context
,
io
,
code
,
in_buffer
,
in_size
,
out_buffer
,
out_size
);
...
...
server/named_pipe.c
View file @
63a23725
...
...
@@ -570,11 +570,25 @@ static enum server_fd_type pipe_client_get_fd_type( struct fd *fd )
return
FD_TYPE_PIPE
;
}
static
obj_handle_t
alloc_wait_event
(
struct
process
*
process
)
{
obj_handle_t
handle
=
0
;
struct
event
*
event
=
create_event
(
NULL
,
NULL
,
0
,
1
,
0
);
if
(
event
)
{
handle
=
alloc_handle
(
process
,
event
,
EVENT_ALL_ACCESS
,
0
);
release_object
(
event
);
}
return
handle
;
}
static
obj_handle_t
pipe_server_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async_data
,
const
void
*
data
,
data_size_t
size
)
{
struct
pipe_server
*
server
=
get_fd_user
(
fd
);
struct
async
*
async
;
obj_handle_t
wait_handle
=
0
;
switch
(
code
)
{
...
...
@@ -583,12 +597,26 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, const a
{
case
ps_idle_server
:
case
ps_wait_connect
:
set_server_state
(
server
,
ps_wait_open
);
if
((
async
=
fd_queue_async
(
server
->
ioctl_fd
,
async_data
,
ASYNC_TYPE_WAIT
,
0
)))
if
(
!
async_data
->
event
&&
!
async_data
->
apc
)
{
async_data_t
new_data
=
*
async_data
;
if
(
!
(
wait_handle
=
alloc_wait_event
(
current
->
process
)))
break
;
new_data
.
event
=
wait_handle
;
if
(
!
(
async
=
fd_queue_async
(
server
->
ioctl_fd
,
&
new_data
,
ASYNC_TYPE_WAIT
,
0
)))
{
close_handle
(
current
->
process
,
wait_handle
);
break
;
}
}
else
async
=
fd_queue_async
(
server
->
ioctl_fd
,
async_data
,
ASYNC_TYPE_WAIT
,
0
);
if
(
async
)
{
set_server_state
(
server
,
ps_wait_open
);
if
(
server
->
pipe
->
waiters
)
async_wake_up
(
server
->
pipe
->
waiters
,
STATUS_SUCCESS
);
release_object
(
async
);
set_error
(
STATUS_PENDING
);
return
wait_handle
;
}
break
;
case
ps_connected_server
:
...
...
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