Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
de6f5699
Commit
de6f5699
authored
Oct 14, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Selectable pipe hack cosmetic changes
parent
207baf6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
src/misc/objects.c
src/misc/objects.c
+10
-15
No files found.
src/misc/objects.c
View file @
de6f5699
...
...
@@ -55,11 +55,6 @@
#ifdef __OS2__
# include <sys/socket.h>
# include <netinet/in.h>
typedef
struct
sockaddr_in
SOCKADDR_IN
;
typedef
struct
sockaddr
*
PSOCKADDR
;
# define closesocket soclose
#elif defined(WIN32)
# include <io.h>
# include <winsock2.h>
...
...
@@ -302,28 +297,28 @@ static void vlc_object_destroy( vlc_object_t *p_this )
# define vlc_pipe selectable_pipe
static
int
selectable_pipe
(
int
fd
[
2
])
{
SOCKADDR_IN
addr
;
struct
sockaddr_in
addr
;
int
addrlen
=
sizeof
(
addr
);
int
l
=
socket
(
PF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
),
a
,
int
l
=
socket
(
PF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
),
c
=
socket
(
PF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
if
(
(
l
==
-
1
)
||
(
c
==
-
1
)
)
if
(
l
==
-
1
||
c
==
-
1
)
goto
error
;
memset
(
&
addr
,
0
,
sizeof
(
addr
));
addr
.
sin_family
=
AF_INET
;
addr
.
sin_addr
.
s_addr
=
htonl
(
INADDR_LOOPBACK
);
if
(
bind
(
l
,
(
PSOCKADDR
)
&
addr
,
sizeof
(
addr
))
||
getsockname
(
l
,
(
PSOCKADDR
)
&
addr
,
&
addrlen
)
if
(
bind
(
l
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
))
||
getsockname
(
l
,
(
struct
sockaddr
*
)
&
addr
,
&
addrlen
)
||
listen
(
l
,
1
)
||
connect
(
c
,
(
PSOCKADDR
)
&
addr
,
addrlen
))
||
connect
(
c
,
(
struct
sockaddr
*
)
&
addr
,
addrlen
))
goto
error
;
a
=
accept
(
l
,
NULL
,
NULL
);
int
a
=
accept
(
l
,
NULL
,
NULL
);
if
(
a
==
-
1
)
goto
error
;
close
socket
(
l
);
close
(
l
);
//shutdown (a, 0);
//shutdown (c, 1);
fd
[
0
]
=
c
;
...
...
@@ -332,9 +327,9 @@ static int selectable_pipe (int fd[2])
error:
if
(
l
!=
-
1
)
close
socket
(
l
);
close
(
l
);
if
(
c
!=
-
1
)
close
socket
(
c
);
close
(
c
);
return
-
1
;
}
#endif
/* WIN32 || __OS2__ */
...
...
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