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
4dbb2cbf
Commit
4dbb2cbf
authored
Oct 04, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Get rid of no longer used support for creating socket-based named pipes.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7eb78541
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
66 deletions
+22
-66
named_pipe.c
server/named_pipe.c
+22
-66
No files found.
server/named_pipe.c
View file @
4dbb2cbf
...
...
@@ -1091,7 +1091,8 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned
return
server
;
}
static
struct
pipe_client
*
create_pipe_client
(
unsigned
int
flags
,
unsigned
int
pipe_flags
,
data_size_t
buffer_size
)
static
struct
pipe_client
*
create_pipe_client
(
unsigned
int
flags
,
unsigned
int
pipe_flags
,
data_size_t
buffer_size
,
unsigned
int
options
)
{
struct
pipe_client
*
client
;
...
...
@@ -1103,6 +1104,15 @@ static struct pipe_client *create_pipe_client( unsigned int flags, unsigned int
client
->
flags
=
flags
;
init_pipe_end
(
&
client
->
pipe_end
,
pipe_flags
,
buffer_size
);
client
->
pipe_end
.
fd
=
alloc_pseudo_fd
(
&
pipe_client_fd_ops
,
&
client
->
pipe_end
.
obj
,
options
);
if
(
!
client
->
pipe_end
.
fd
)
{
release_object
(
client
);
return
NULL
;
}
allow_fd_caching
(
client
->
pipe_end
.
fd
);
set_fd_signaled
(
client
->
pipe_end
.
fd
,
1
);
return
client
;
}
...
...
@@ -1148,7 +1158,6 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
struct
pipe_server
*
server
;
struct
pipe_client
*
client
;
unsigned
int
pipe_sharing
;
int
fds
[
2
];
if
(
!
(
server
=
find_available_server
(
pipe
)))
{
...
...
@@ -1165,71 +1174,18 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
return
NULL
;
}
if
((
client
=
create_pipe_client
(
options
,
pipe
->
flags
,
pipe
->
outsize
)))
if
((
client
=
create_pipe_client
(
options
,
pipe
->
flags
,
pipe
->
outsize
,
options
)))
{
if
(
use_server_io
(
&
server
->
pipe_end
))
{
client
->
pipe_end
.
fd
=
alloc_pseudo_fd
(
&
pipe_client_fd_ops
,
&
client
->
pipe_end
.
obj
,
options
);
if
(
client
->
pipe_end
.
fd
)
{
set_fd_signaled
(
client
->
pipe_end
.
fd
,
1
);
server
->
pipe_end
.
fd
=
(
struct
fd
*
)
grab_object
(
server
->
ioctl_fd
);
set_no_fd_status
(
server
->
ioctl_fd
,
STATUS_BAD_DEVICE_TYPE
);
}
else
{
release_object
(
client
);
client
=
NULL
;
}
}
else
if
(
!
socketpair
(
PF_UNIX
,
SOCK_STREAM
,
0
,
fds
))
{
assert
(
!
server
->
pipe_end
.
fd
);
fcntl
(
fds
[
0
],
F_SETFL
,
O_NONBLOCK
);
fcntl
(
fds
[
1
],
F_SETFL
,
O_NONBLOCK
);
if
(
pipe
->
insize
)
{
setsockopt
(
fds
[
0
],
SOL_SOCKET
,
SO_RCVBUF
,
&
pipe
->
insize
,
sizeof
(
pipe
->
insize
)
);
setsockopt
(
fds
[
1
],
SOL_SOCKET
,
SO_RCVBUF
,
&
pipe
->
insize
,
sizeof
(
pipe
->
insize
)
);
}
if
(
pipe
->
outsize
)
{
setsockopt
(
fds
[
0
],
SOL_SOCKET
,
SO_SNDBUF
,
&
pipe
->
outsize
,
sizeof
(
pipe
->
outsize
)
);
setsockopt
(
fds
[
1
],
SOL_SOCKET
,
SO_SNDBUF
,
&
pipe
->
outsize
,
sizeof
(
pipe
->
outsize
)
);
}
client
->
pipe_end
.
fd
=
create_anonymous_fd
(
&
pipe_client_fd_ops
,
fds
[
1
],
&
client
->
pipe_end
.
obj
,
options
);
server
->
pipe_end
.
fd
=
create_anonymous_fd
(
&
pipe_server_fd_ops
,
fds
[
0
],
&
server
->
pipe_end
.
obj
,
server
->
options
);
if
(
client
->
pipe_end
.
fd
&&
server
->
pipe_end
.
fd
)
{
fd_copy_completion
(
server
->
ioctl_fd
,
server
->
pipe_end
.
fd
);
}
else
{
release_object
(
client
);
client
=
NULL
;
}
}
else
{
file_set_error
();
release_object
(
client
);
client
=
NULL
;
}
if
(
client
)
{
allow_fd_caching
(
client
->
pipe_end
.
fd
);
allow_fd_caching
(
server
->
pipe_end
.
fd
);
if
(
server
->
state
==
ps_wait_open
)
fd_async_wake_up
(
server
->
ioctl_fd
,
ASYNC_TYPE_WAIT
,
STATUS_SUCCESS
);
set_server_state
(
server
,
ps_connected_server
);
server
->
client
=
client
;
client
->
server
=
server
;
server
->
pipe_end
.
connection
=
&
client
->
pipe_end
;
client
->
pipe_end
.
connection
=
&
server
->
pipe_end
;
}
server
->
pipe_end
.
fd
=
(
struct
fd
*
)
grab_object
(
server
->
ioctl_fd
);
set_no_fd_status
(
server
->
ioctl_fd
,
STATUS_BAD_DEVICE_TYPE
);
allow_fd_caching
(
server
->
pipe_end
.
fd
);
if
(
server
->
state
==
ps_wait_open
)
fd_async_wake_up
(
server
->
ioctl_fd
,
ASYNC_TYPE_WAIT
,
STATUS_SUCCESS
);
set_server_state
(
server
,
ps_connected_server
);
server
->
client
=
client
;
client
->
server
=
server
;
server
->
pipe_end
.
connection
=
&
client
->
pipe_end
;
client
->
pipe_end
.
connection
=
&
server
->
pipe_end
;
}
release_object
(
server
);
return
&
client
->
pipe_end
.
obj
;
...
...
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