Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
321c1d51
Commit
321c1d51
authored
Jan 10, 2016
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use vlc_socketpair()
parent
9d02c991
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
20 deletions
+4
-20
modules/access/http/h1conn_test.c
modules/access/http/h1conn_test.c
+1
-4
modules/access/http/h2conn_test.c
modules/access/http/h2conn_test.c
+1
-4
src/os2/filesystem.c
src/os2/filesystem.c
+1
-3
test/modules/misc/tls.c
test/modules/misc/tls.c
+1
-9
No files found.
modules/access/http/h1conn_test.c
View file @
321c1d51
...
...
@@ -30,9 +30,6 @@
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#ifndef SOCK_CLOEXEC
# define SOCK_CLOEXEC 0
#endif
#include <vlc_common.h>
#include <vlc_block.h>
...
...
@@ -47,7 +44,7 @@ static void conn_create(void)
{
int
fds
[
2
];
if
(
socketpair
(
PF_LOCAL
,
SOCK_STREAM
|
SOCK_CLOEXEC
,
0
,
fds
))
if
(
vlc_socketpair
(
PF_LOCAL
,
SOCK_STREAM
,
0
,
fds
,
false
))
assert
(
!
"socketpair"
);
struct
vlc_tls
*
tls
=
vlc_tls_DummyCreate
(
NULL
,
fds
[
1
]);
...
...
modules/access/http/h2conn_test.c
View file @
321c1d51
...
...
@@ -30,9 +30,6 @@
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#ifndef SOCK_CLOEXEC
# define SOCK_CLOEXEC 0
#endif
#include <vlc_common.h>
#include <vlc_block.h>
...
...
@@ -93,7 +90,7 @@ static void conn_create(void)
int
fds
[
2
];
char
hello
[
24
];
if
(
socketpair
(
PF_LOCAL
,
SOCK_STREAM
|
SOCK_CLOEXEC
,
0
,
fds
))
if
(
vlc_socketpair
(
PF_LOCAL
,
SOCK_STREAM
,
0
,
fds
,
false
))
assert
(
!
"socketpair"
);
struct
vlc_tls
*
tls
=
vlc_tls_DummyCreate
(
NULL
,
fds
[
1
]);
...
...
src/os2/filesystem.c
View file @
321c1d51
...
...
@@ -258,7 +258,7 @@ int vlc_dup (int oldfd)
int
vlc_pipe
(
int
fds
[
2
])
{
if
(
socketpair
(
AF_LOCAL
,
SOCK_STREAM
,
0
,
fds
))
if
(
vlc_socketpair
(
AF_LOCAL
,
SOCK_STREAM
,
0
,
fds
,
false
))
return
-
1
;
shutdown
(
fds
[
0
],
SHUT_WR
);
...
...
@@ -267,8 +267,6 @@ int vlc_pipe (int fds[2])
setmode
(
fds
[
0
],
O_BINARY
);
setmode
(
fds
[
1
],
O_BINARY
);
fcntl
(
fds
[
0
],
F_SETFD
,
FD_CLOEXEC
);
fcntl
(
fds
[
1
],
F_SETFD
,
FD_CLOEXEC
);
return
0
;
}
...
...
test/modules/misc/tls.c
View file @
321c1d51
...
...
@@ -30,9 +30,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#ifndef SOCK_CLOEXEC
# define SOCK_CLOEXEC 0
#endif
#include <poll.h>
#include <fcntl.h>
#include <unistd.h>
...
...
@@ -47,12 +44,7 @@
static
int
tlspair
(
int
fds
[
2
])
{
if
(
socketpair
(
PF_LOCAL
,
SOCK_STREAM
|
SOCK_CLOEXEC
,
0
,
fds
))
return
-
1
;
fcntl
(
fds
[
0
],
F_SETFL
,
O_NONBLOCK
|
fcntl
(
fds
[
0
],
F_GETFL
));
fcntl
(
fds
[
1
],
F_SETFL
,
O_NONBLOCK
|
fcntl
(
fds
[
1
],
F_GETFL
));
return
0
;
return
vlc_socketpair
(
PF_LOCAL
,
SOCK_STREAM
,
0
,
fds
,
true
);
}
static
int
question_callback
(
vlc_object_t
*
obj
,
const
char
*
varname
,
...
...
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