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
46fe7177
Commit
46fe7177
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_WAIT on the server side.
parent
63a23725
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
27 deletions
+17
-27
file.c
dlls/ntdll/file.c
+1
-22
named_pipe.c
server/named_pipe.c
+16
-5
No files found.
dlls/ntdll/file.c
View file @
46fe7177
...
...
@@ -1075,28 +1075,6 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
if
(
!
status
)
status
=
DIR_unmount_device
(
handle
);
break
;
case
FSCTL_PIPE_WAIT
:
{
HANDLE
internal_event
=
0
;
if
(
!
event
&&
!
apc
)
{
status
=
NtCreateEvent
(
&
internal_event
,
EVENT_ALL_ACCESS
,
NULL
,
FALSE
,
FALSE
);
if
(
status
!=
STATUS_SUCCESS
)
break
;
event
=
internal_event
;
}
status
=
server_ioctl_file
(
handle
,
event
,
apc
,
apc_context
,
io
,
code
,
in_buffer
,
in_size
,
out_buffer
,
out_size
);
if
(
internal_event
&&
status
==
STATUS_PENDING
)
{
while
(
NtWaitForSingleObject
(
internal_event
,
TRUE
,
NULL
)
==
STATUS_USER_APC
)
/*nothing*/
;
status
=
io
->
u
.
Status
;
}
if
(
internal_event
)
NtClose
(
internal_event
);
}
break
;
case
FSCTL_PIPE_PEEK
:
{
FILE_PIPE_PEEK_BUFFER
*
buffer
=
out_buffer
;
...
...
@@ -1173,6 +1151,7 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
break
;
case
FSCTL_PIPE_LISTEN
:
case
FSCTL_PIPE_WAIT
:
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 @
46fe7177
...
...
@@ -846,6 +846,7 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, c
case
FSCTL_PIPE_WAIT
:
{
const
FILE_PIPE_WAIT_FOR_BUFFER
*
buffer
=
data
;
obj_handle_t
wait_handle
=
0
;
struct
named_pipe
*
pipe
;
struct
pipe_server
*
server
;
struct
unicode_str
name
;
...
...
@@ -867,13 +868,22 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, c
{
struct
async
*
async
;
if
(
!
pipe
->
waiters
&&
!
(
pipe
->
waiters
=
create_async_queue
(
NULL
)))
if
(
!
pipe
->
waiters
&&
!
(
pipe
->
waiters
=
create_async_queue
(
NULL
)))
goto
done
;
if
(
!
async_data
->
event
&&
!
async_data
->
apc
)
{
release_object
(
pipe
);
return
0
;
async_data_t
new_data
=
*
async_data
;
if
(
!
(
wait_handle
=
alloc_wait_event
(
current
->
process
)))
goto
done
;
new_data
.
event
=
wait_handle
;
if
(
!
(
async
=
create_async
(
current
,
pipe
->
waiters
,
&
new_data
)))
{
close_handle
(
current
->
process
,
wait_handle
);
wait_handle
=
0
;
}
}
else
async
=
create_async
(
current
,
pipe
->
waiters
,
async_data
);
if
(
(
async
=
create_async
(
current
,
pipe
->
waiters
,
async_data
))
)
if
(
async
)
{
timeout_t
when
=
buffer
->
TimeoutSpecified
?
buffer
->
Timeout
.
QuadPart
:
pipe
->
timeout
;
async_set_timeout
(
async
,
when
,
STATUS_IO_TIMEOUT
);
...
...
@@ -883,8 +893,9 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, c
}
else
release_object
(
server
);
done:
release_object
(
pipe
);
return
0
;
return
wait_handle
;
}
default:
...
...
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