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
6498ea18
Commit
6498ea18
authored
Aug 16, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use pipe stored in pipe_end in set_named_pipe_info.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3375ccba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
30 deletions
+10
-30
named_pipe.c
server/named_pipe.c
+10
-30
No files found.
server/named_pipe.c
View file @
6498ea18
...
...
@@ -1075,14 +1075,6 @@ static int pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
}
}
static
struct
pipe_server
*
get_pipe_server_obj
(
struct
process
*
process
,
obj_handle_t
handle
,
unsigned
int
access
)
{
struct
object
*
obj
;
obj
=
get_handle_obj
(
process
,
handle
,
access
,
&
pipe_server_ops
);
return
(
struct
pipe_server
*
)
obj
;
}
static
void
init_pipe_end
(
struct
pipe_end
*
pipe_end
,
struct
named_pipe
*
pipe
,
unsigned
int
pipe_flags
,
data_size_t
buffer_size
)
{
...
...
@@ -1387,42 +1379,30 @@ DECL_HANDLER(get_named_pipe_info)
DECL_HANDLER
(
set_named_pipe_info
)
{
struct
pipe_server
*
server
;
struct
pipe_client
*
client
=
NULL
;
struct
pipe_end
*
pipe_end
;
server
=
get_pipe_server_obj
(
current
->
process
,
req
->
handle
,
FILE_WRITE_ATTRIBUTES
);
if
(
!
server
)
pipe_end
=
(
struct
pipe_end
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
FILE_WRITE_ATTRIBUTES
,
&
pipe_server_ops
);
if
(
!
pipe_end
)
{
if
(
get_error
()
!=
STATUS_OBJECT_TYPE_MISMATCH
)
return
;
clear_error
();
client
=
(
struct
pipe_client
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
0
,
&
pipe_client_ops
);
if
(
!
client
)
return
;
if
(
!
(
server
=
client
->
server
))
{
release_object
(
client
);
return
;
}
pipe_end
=
(
struct
pipe_end
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
0
,
&
pipe_client_ops
);
if
(
!
pipe_end
)
return
;
}
if
((
req
->
flags
&
~
(
NAMED_PIPE_MESSAGE_STREAM_READ
|
NAMED_PIPE_NONBLOCKING_MODE
))
||
((
req
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_READ
)
&&
!
(
server
->
pipe
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_WRITE
)))
((
req
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_READ
)
&&
!
(
pipe_end
->
pipe
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_WRITE
)))
{
set_error
(
STATUS_INVALID_PARAMETER
);
}
else
if
(
client
)
{
client
->
pipe_end
.
flags
=
server
->
pipe
->
flags
|
req
->
flags
;
}
else
{
server
->
pipe_end
.
flags
=
server
->
pipe
->
flags
|
req
->
flags
;
pipe_end
->
flags
=
pipe_end
->
pipe
->
flags
|
req
->
flags
;
}
if
(
client
)
release_object
(
client
);
else
release_object
(
server
);
release_object
(
pipe_end
);
}
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