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
d68c6959
Commit
d68c6959
authored
Jan 20, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netsync: this was the last unchecked FD_SET/FD_ISSET usage.
Note however that LUA should still be moved to poll().
parent
4793450e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
modules/control/netsync.c
modules/control/netsync.c
+4
-9
No files found.
modules/control/netsync.c
View file @
d68c6959
...
@@ -164,9 +164,6 @@ static void Run( intf_thread_t *p_intf )
...
@@ -164,9 +164,6 @@ static void Run( intf_thread_t *p_intf )
while
(
!
intf_ShouldDie
(
p_intf
)
)
while
(
!
intf_ShouldDie
(
p_intf
)
)
{
{
struct
timeval
timeout
;
fd_set
fds_r
;
/* Update the input */
/* Update the input */
if
(
p_intf
->
p_sys
->
p_input
==
NULL
)
if
(
p_intf
->
p_sys
->
p_input
==
NULL
)
{
{
...
@@ -192,10 +189,8 @@ static void Run( intf_thread_t *p_intf )
...
@@ -192,10 +189,8 @@ static void Run( intf_thread_t *p_intf )
*/
*/
/* Initialize file descriptor set and timeout (0.5s) */
/* Initialize file descriptor set and timeout (0.5s) */
FD_ZERO
(
&
fds_r
);
/* FIXME: arbitrary tick */
FD_SET
(
i_socket
,
&
fds_r
);
struct
pollfd
ufd
=
{
.
fd
=
i_socket
,
.
events
=
POLLIN
,
};
timeout
.
tv_sec
=
0
;
timeout
.
tv_usec
=
500000
;
if
(
b_master
)
if
(
b_master
)
{
{
...
@@ -204,7 +199,7 @@ static void Run( intf_thread_t *p_intf )
...
@@ -204,7 +199,7 @@ static void Run( intf_thread_t *p_intf )
int
i_struct_size
,
i_read
,
i_ret
;
int
i_struct_size
,
i_read
,
i_ret
;
/* Don't block */
/* Don't block */
i_ret
=
select
(
i_socket
+
1
,
&
fds_r
,
0
,
0
,
&
timeout
);
i_ret
=
poll
(
&
ufd
,
1
,
500
);
if
(
i_ret
==
0
)
continue
;
if
(
i_ret
==
0
)
continue
;
if
(
i_ret
<
0
)
if
(
i_ret
<
0
)
{
{
...
@@ -259,7 +254,7 @@ static void Run( intf_thread_t *p_intf )
...
@@ -259,7 +254,7 @@ static void Run( intf_thread_t *p_intf )
}
}
/* Don't block */
/* Don't block */
i_ret
=
select
(
i_socket
+
1
,
&
fds_r
,
0
,
0
,
&
timeout
);
i_ret
=
poll
(
&
ufd
,
1
,
500
);
if
(
i_ret
==
0
)
continue
;
if
(
i_ret
==
0
)
continue
;
if
(
i_ret
<
0
)
if
(
i_ret
<
0
)
{
{
...
...
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