Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
c07085a9
Commit
c07085a9
authored
Sep 08, 2006
by
Rémi Denis-Courmont
Browse files
Reallow file descriptor above FD_SETSIZE since we now use poll()
parent
ad3d32f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/network/io.c
View file @
c07085a9
...
...
@@ -79,14 +79,6 @@ int net_Socket( vlc_object_t *p_this, int i_family, int i_socktype,
msg_Err
(
p_this
,
"cannot set socket to non-blocking mode"
);
}
#else
if
(
fd
>=
FD_SETSIZE
)
{
/* We don't want to overflow select() fd_set */
msg_Err
(
p_this
,
"cannot create socket (too many already in use)"
);
net_Close
(
fd
);
return
-
1
;
}
fcntl
(
fd
,
F_SETFD
,
FD_CLOEXEC
);
i_val
=
fcntl
(
fd
,
F_GETFL
,
0
);
fcntl
(
fd
,
F_SETFL
,
((
i_val
!=
-
1
)
?
i_val
:
0
)
|
O_NONBLOCK
);
...
...
src/network/tcp.c
View file @
c07085a9
...
...
@@ -416,13 +416,6 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait )
if
(
i_val
<
0
)
msg_Err
(
p_this
,
"accept failed (%s)"
,
net_strerror
(
net_errno
)
);
#ifndef WIN32
else
if
(
i_val
>=
FD_SETSIZE
)
{
net_Close
(
i_val
);
/* avoid future overflows in FD_SET */
msg_Err
(
p_this
,
"accept failed (too many sockets opened)"
);
}
#endif
else
{
const
int
yes
=
1
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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