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
7b3c1c25
Commit
7b3c1c25
authored
Jun 26, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set IPV6_PROTECTION_LEVEL (yet another Microsoft's stupid idea)
at the "right" place, namely ListenTCP rather than OpenTCP
parent
6f987b51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
src/misc/net.c
src/misc/net.c
+13
-11
No files found.
src/misc/net.c
View file @
7b3c1c25
...
@@ -151,17 +151,6 @@ int __net_OpenTCP( vlc_object_t *p_this, const char *psz_host, int i_port )
...
@@ -151,17 +151,6 @@ int __net_OpenTCP( vlc_object_t *p_this, const char *psz_host, int i_port )
if
(
ioctlsocket
(
fd
,
FIONBIO
,
&
i_dummy
)
!=
0
)
if
(
ioctlsocket
(
fd
,
FIONBIO
,
&
i_dummy
)
!=
0
)
msg_Err
(
p_this
,
"cannot set socket to non-blocking mode"
);
msg_Err
(
p_this
,
"cannot set socket to non-blocking mode"
);
}
}
# ifdef IPV6_PROTECTION_LEVEL
if
(
ptr
->
ai_family
==
PF_INET6
)
{
i_val
=
PROTECTION_LEVEL_UNRESTRICTED
;
setsockopt
(
fd
,
IPPROTO_IPV6
,
IPV6_PROTECTION_LEVEL
,
&
i_val
,
sizeof
(
i_val
)
);
}
# else
# warning You are using outdated headers for Winsock !
# endif
#else
#else
if
(
(
(
i_val
=
fcntl
(
fd
,
F_GETFL
,
0
)
)
<
0
)
||
if
(
(
(
i_val
=
fcntl
(
fd
,
F_GETFL
,
0
)
)
<
0
)
||
(
fcntl
(
fd
,
F_SETFL
,
i_val
|
O_NONBLOCK
)
<
0
)
)
(
fcntl
(
fd
,
F_SETFL
,
i_val
|
O_NONBLOCK
)
<
0
)
)
...
@@ -365,6 +354,19 @@ int *__net_ListenTCP( vlc_object_t *p_this, const char *psz_host, int i_port )
...
@@ -365,6 +354,19 @@ int *__net_ListenTCP( vlc_object_t *p_this, const char *psz_host, int i_port )
setsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
void
*
)
&
i_val
,
setsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
void
*
)
&
i_val
,
sizeof
(
i_val
)
);
sizeof
(
i_val
)
);
#if defined( WIN32 ) || defined( UNDER_CE )
# ifdef IPV6_PROTECTION_LEVEL
if
(
ptr
->
ai_family
==
PF_INET6
)
{
i_val
=
PROTECTION_LEVEL_UNRESTRICTED
;
setsockopt
(
fd
,
IPPROTO_IPV6
,
IPV6_PROTECTION_LEVEL
,
&
i_val
,
sizeof
(
i_val
)
);
}
# else
# warning You are using outdated headers for Winsock !
# endif
#endif
/* Bind the socket */
/* Bind the socket */
if
(
bind
(
fd
,
ptr
->
ai_addr
,
ptr
->
ai_addrlen
)
)
if
(
bind
(
fd
,
ptr
->
ai_addr
,
ptr
->
ai_addrlen
)
)
{
{
...
...
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