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
c9833f89
Commit
c9833f89
authored
Mar 28, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add FSCTL_PIPE_TRANSCEIVE implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a588a5a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
8 deletions
+57
-8
named_pipe.c
server/named_pipe.c
+57
-8
No files found.
server/named_pipe.c
View file @
c9833f89
...
...
@@ -900,6 +900,61 @@ static int pipe_end_peek( struct pipe_end *pipe_end )
return
1
;
}
static
int
pipe_end_transceive
(
struct
pipe_end
*
pipe_end
,
struct
async
*
async
)
{
struct
pipe_message
*
message
;
struct
iosb
*
iosb
;
if
((
pipe_end
->
flags
&
(
NAMED_PIPE_MESSAGE_STREAM_WRITE
|
NAMED_PIPE_MESSAGE_STREAM_READ
))
!=
(
NAMED_PIPE_MESSAGE_STREAM_WRITE
|
NAMED_PIPE_MESSAGE_STREAM_READ
))
{
set_error
(
STATUS_INVALID_READ_MODE
);
return
0
;
}
if
(
!
pipe_end
->
connection
)
{
set_error
(
STATUS_PIPE_BROKEN
);
return
0
;
}
/* not allowed if we already have read data buffered */
if
(
!
list_empty
(
&
pipe_end
->
message_queue
))
{
set_error
(
STATUS_PIPE_BUSY
);
return
0
;
}
iosb
=
async_get_iosb
(
async
);
/* ignore output buffer copy transferred because of METHOD_NEITHER */
iosb
->
in_size
-=
iosb
->
out_size
;
/* transaction never blocks on write, so just queue a message without async */
message
=
queue_message
(
pipe_end
->
connection
,
iosb
);
release_object
(
iosb
);
if
(
!
message
)
return
0
;
reselect_read_queue
(
pipe_end
->
connection
);
queue_async
(
&
pipe_end
->
read_q
,
async
);
reselect_read_queue
(
pipe_end
);
set_error
(
STATUS_PENDING
);
return
1
;
}
static
int
pipe_end_ioctl
(
struct
pipe_end
*
pipe_end
,
ioctl_code_t
code
,
struct
async
*
async
)
{
switch
(
code
)
{
case
FSCTL_PIPE_PEEK
:
return
pipe_end_peek
(
pipe_end
);
case
FSCTL_PIPE_TRANSCEIVE
:
return
pipe_end_transceive
(
pipe_end
,
async
);
default:
return
default_fd_ioctl
(
pipe_end
->
fd
,
code
,
async
);
}
}
static
int
pipe_server_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
{
struct
pipe_server
*
server
=
get_fd_user
(
fd
);
...
...
@@ -955,11 +1010,8 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
}
return
1
;
case
FSCTL_PIPE_PEEK
:
return
pipe_end_peek
(
&
server
->
pipe_end
);
default:
return
default_fd_ioctl
(
f
d
,
code
,
async
);
return
pipe_end_ioctl
(
&
server
->
pipe_en
d
,
code
,
async
);
}
}
...
...
@@ -973,11 +1025,8 @@ static int pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
set_error
(
STATUS_ILLEGAL_FUNCTION
);
return
0
;
case
FSCTL_PIPE_PEEK
:
return
pipe_end_peek
(
&
client
->
pipe_end
);
default:
return
default_fd_ioctl
(
f
d
,
code
,
async
);
return
pipe_end_ioctl
(
&
client
->
pipe_en
d
,
code
,
async
);
}
}
...
...
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