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
975c5381
Commit
975c5381
authored
Mar 26, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Added support for flushing client pipe.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aa472f5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
pipe.c
dlls/kernel32/tests/pipe.c
+7
-0
named_pipe.c
server/named_pipe.c
+6
-2
No files found.
dlls/kernel32/tests/pipe.c
View file @
975c5381
...
@@ -2853,6 +2853,9 @@ static void test_overlapped_transport(BOOL msg_mode, BOOL msg_read_mode)
...
@@ -2853,6 +2853,9 @@ static void test_overlapped_transport(BOOL msg_mode, BOOL msg_read_mode)
trace
(
"testing %s, %s server->client writes...
\n
"
,
trace
(
"testing %s, %s server->client writes...
\n
"
,
msg_mode
?
"message mode"
:
"byte mode"
,
msg_read_mode
?
"message read"
:
"byte read"
);
msg_mode
?
"message mode"
:
"byte mode"
,
msg_read_mode
?
"message read"
:
"byte read"
);
test_blocking_rw
(
server
,
client
,
5000
,
msg_mode
,
msg_read_mode
);
test_blocking_rw
(
server
,
client
,
5000
,
msg_mode
,
msg_read_mode
);
trace
(
"testing %s, %s client->server writes...
\n
"
,
msg_mode
?
"message mode"
:
"byte mode"
,
msg_read_mode
?
"message read"
:
"byte read"
);
test_blocking_rw
(
client
,
server
,
6000
,
msg_mode
,
msg_read_mode
);
CloseHandle
(
client
);
CloseHandle
(
client
);
CloseHandle
(
server
);
CloseHandle
(
server
);
...
@@ -2869,18 +2872,22 @@ static void test_overlapped_transport(BOOL msg_mode, BOOL msg_read_mode)
...
@@ -2869,18 +2872,22 @@ static void test_overlapped_transport(BOOL msg_mode, BOOL msg_read_mode)
/* close server with pending writes */
/* close server with pending writes */
create_overlapped_pipe
(
create_flags
,
&
client
,
&
server
);
create_overlapped_pipe
(
create_flags
,
&
client
,
&
server
);
overlapped_write_async
(
client
,
buf
,
7000
,
&
overlapped
);
overlapped_write_async
(
client
,
buf
,
7000
,
&
overlapped
);
flush
=
test_flush_async
(
client
,
ERROR_BROKEN_PIPE
);
CloseHandle
(
server
);
CloseHandle
(
server
);
test_overlapped_failure
(
client
,
&
overlapped
,
ERROR_BROKEN_PIPE
);
test_overlapped_failure
(
client
,
&
overlapped
,
ERROR_BROKEN_PIPE
);
test_flush_done
(
flush
);
CloseHandle
(
client
);
CloseHandle
(
client
);
/* disconnect with pending writes */
/* disconnect with pending writes */
create_overlapped_pipe
(
create_flags
,
&
client
,
&
server
);
create_overlapped_pipe
(
create_flags
,
&
client
,
&
server
);
overlapped_write_async
(
client
,
buf
,
7000
,
&
overlapped
);
overlapped_write_async
(
client
,
buf
,
7000
,
&
overlapped
);
overlapped_write_async
(
server
,
buf
,
7000
,
&
overlapped2
);
overlapped_write_async
(
server
,
buf
,
7000
,
&
overlapped2
);
flush
=
test_flush_async
(
client
,
ERROR_PIPE_NOT_CONNECTED
);
res
=
DisconnectNamedPipe
(
server
);
res
=
DisconnectNamedPipe
(
server
);
ok
(
res
,
"DisconnectNamedPipe failed: %u
\n
"
,
GetLastError
());
ok
(
res
,
"DisconnectNamedPipe failed: %u
\n
"
,
GetLastError
());
test_overlapped_failure
(
client
,
&
overlapped
,
ERROR_PIPE_NOT_CONNECTED
);
test_overlapped_failure
(
client
,
&
overlapped
,
ERROR_PIPE_NOT_CONNECTED
);
test_overlapped_failure
(
client
,
&
overlapped2
,
ERROR_PIPE_NOT_CONNECTED
);
test_overlapped_failure
(
client
,
&
overlapped2
,
ERROR_PIPE_NOT_CONNECTED
);
test_flush_done
(
flush
);
CloseHandle
(
server
);
CloseHandle
(
server
);
CloseHandle
(
client
);
CloseHandle
(
client
);
}
}
...
...
server/named_pipe.c
View file @
975c5381
...
@@ -656,6 +656,9 @@ static obj_handle_t pipe_end_flush( struct pipe_end *pipe_end, struct async *asy
...
@@ -656,6 +656,9 @@ static obj_handle_t pipe_end_flush( struct pipe_end *pipe_end, struct async *asy
{
{
obj_handle_t
handle
=
0
;
obj_handle_t
handle
=
0
;
if
(
use_server_io
(
pipe_end
)
&&
(
!
pipe_end
->
connection
||
list_empty
(
&
pipe_end
->
connection
->
message_queue
)))
return
0
;
if
(
!
fd_queue_async
(
pipe_end
->
fd
,
async
,
ASYNC_TYPE_WAIT
))
return
0
;
if
(
!
fd_queue_async
(
pipe_end
->
fd
,
async
,
ASYNC_TYPE_WAIT
))
return
0
;
if
(
!
blocking
||
(
handle
=
alloc_handle
(
current
->
process
,
async
,
SYNCHRONIZE
,
0
)))
if
(
!
blocking
||
(
handle
=
alloc_handle
(
current
->
process
,
async
,
SYNCHRONIZE
,
0
)))
...
@@ -682,8 +685,9 @@ static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int b
...
@@ -682,8 +685,9 @@ static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int b
static
obj_handle_t
pipe_client_flush
(
struct
fd
*
fd
,
struct
async
*
async
,
int
blocking
)
static
obj_handle_t
pipe_client_flush
(
struct
fd
*
fd
,
struct
async
*
async
,
int
blocking
)
{
{
/* FIXME: what do we have to do for this? */
struct
pipe_end
*
pipe_end
=
get_fd_user
(
fd
);
return
0
;
/* FIXME: Support byte mode. */
return
use_server_io
(
pipe_end
)
?
pipe_end_flush
(
pipe_end
,
async
,
blocking
)
:
0
;
}
}
static
void
message_queue_read
(
struct
pipe_end
*
pipe_end
,
struct
iosb
*
iosb
)
static
void
message_queue_read
(
struct
pipe_end
*
pipe_end
,
struct
iosb
*
iosb
)
...
...
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