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
2a1ed30d
Commit
2a1ed30d
authored
Feb 15, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove timeout in network read APIs - closes #1056
parent
569c1ac4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
17 deletions
+7
-17
src/network/io.c
src/network/io.c
+7
-17
No files found.
src/network/io.c
View file @
2a1ed30d
...
...
@@ -279,7 +279,7 @@ static ssize_t
net_ReadInner
(
vlc_object_t
*
restrict
p_this
,
unsigned
fdc
,
const
int
*
fdv
,
const
v_socket_t
*
const
*
restrict
vsv
,
uint8_t
*
restrict
p_buf
,
size_t
i_buflen
,
int
wait_ms
,
vlc_bool_t
waitall
)
vlc_bool_t
dontwait
,
vlc_bool_t
waitall
)
{
size_t
i_total
=
0
;
...
...
@@ -289,10 +289,7 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
ssize_t
n
;
struct
pollfd
ufd
[
fdc
];
int
delay_ms
=
500
;
if
((
wait_ms
!=
-
1
)
&&
(
wait_ms
<
500
))
delay_ms
=
wait_ms
;
int
delay_ms
=
dontwait
?
0
:
500
;
if
(
p_this
->
b_die
)
{
errno
=
EINTR
;
...
...
@@ -379,16 +376,8 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
p_buf
+=
n
;
i_buflen
-=
n
;
if
(
!
waitall
)
if
(
dontwait
||
!
waitall
)
break
;
/* FIXME: This is broken. Do not us this. */
if
(
wait_ms
!=
-
1
)
{
wait_ms
-=
delay_ms
;
if
(
wait_ms
==
0
)
return
i_total
;
// time's up!
}
}
return
i_total
;
...
...
@@ -411,7 +400,7 @@ ssize_t __net_Read( vlc_object_t *restrict p_this, int fd,
{
return
net_ReadInner
(
p_this
,
1
,
&
(
int
){
fd
},
&
(
const
v_socket_t
*
){
p_vs
},
buf
,
len
,
-
1
,
b_retry
);
buf
,
len
,
VLC_FALSE
,
b_retry
);
}
...
...
@@ -428,7 +417,7 @@ ssize_t __net_ReadNonBlock( vlc_object_t *restrict p_this, int fd,
{
return
net_ReadInner
(
p_this
,
1
,
&
(
int
){
fd
},
&
(
const
v_socket_t
*
){
p_vs
},
buf
,
len
,
0
,
VLC_FALSE
);
buf
,
len
,
VLC_TRUE
,
VLC_FALSE
);
}
...
...
@@ -444,7 +433,8 @@ ssize_t __net_Select( vlc_object_t *restrict p_this,
const
v_socket_t
*
vsv
[
nfd
];
memset
(
vsv
,
0
,
sizeof
(
vsv
)
);
return
net_ReadInner
(
p_this
,
nfd
,
fds
,
vsv
,
buf
,
len
,
-
1
,
VLC_FALSE
);
return
net_ReadInner
(
p_this
,
nfd
,
fds
,
vsv
,
buf
,
len
,
VLC_FALSE
,
VLC_FALSE
);
}
...
...
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