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
c4c68958
Commit
c4c68958
authored
Aug 14, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
select() sucks
parent
3b396a3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
src/network/tcp.c
src/network/tcp.c
+2
-10
No files found.
src/network/tcp.c
View file @
c4c68958
...
@@ -135,7 +135,6 @@ int __net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
...
@@ -135,7 +135,6 @@ int __net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
{
{
socklen_t
i_val_size
=
sizeof
(
i_val
);
socklen_t
i_val_size
=
sizeof
(
i_val
);
div_t
d
;
div_t
d
;
struct
timeval
tv
;
vlc_value_t
timeout
;
vlc_value_t
timeout
;
if
(
net_errno
!=
EINPROGRESS
)
if
(
net_errno
!=
EINPROGRESS
)
...
@@ -162,7 +161,7 @@ int __net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
...
@@ -162,7 +161,7 @@ int __net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
msg_Dbg
(
p_this
,
"connection in progress"
);
msg_Dbg
(
p_this
,
"connection in progress"
);
for
(;;)
for
(;;)
{
{
fd_set
fds
;
struct
pollfd
ufd
=
{
.
fd
=
fd
,
.
events
=
POLLOUT
}
;
int
i_ret
;
int
i_ret
;
if
(
p_this
->
b_die
)
if
(
p_this
->
b_die
)
...
@@ -174,19 +173,12 @@ int __net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
...
@@ -174,19 +173,12 @@ int __net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
return
-
1
;
return
-
1
;
}
}
/* Initialize file descriptor set */
FD_ZERO
(
&
fds
);
FD_SET
(
fd
,
&
fds
);
/*
/*
* We'll wait 0.1 second if nothing happens
* We'll wait 0.1 second if nothing happens
* NOTE:
* NOTE:
* time out will be shortened if we catch a signal (EINTR)
* time out will be shortened if we catch a signal (EINTR)
*/
*/
tv
.
tv_sec
=
0
;
i_ret
=
poll
(
&
ufd
,
1
,
(
d
.
quot
>
0
)
?
100
:
d
.
rem
);
tv
.
tv_usec
=
(
d
.
quot
>
0
)
?
100000
:
(
1000
*
d
.
rem
);
i_ret
=
select
(
fd
+
1
,
NULL
,
&
fds
,
NULL
,
&
tv
);
if
(
i_ret
==
1
)
if
(
i_ret
==
1
)
break
;
break
;
...
...
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