Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
ed9144ba
Commit
ed9144ba
authored
Dec 22, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert [23768] and [23768]. Fix dead lock whenever reading from the network.
parent
f9ff5b64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
src/network/io.c
src/network/io.c
+5
-10
No files found.
src/network/io.c
View file @
ed9144ba
...
...
@@ -256,8 +256,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
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
,
vlc_bool_t
waitall
,
int
timeout
)
uint8_t
*
restrict
p_buf
,
size_t
i_buflen
,
vlc_bool_t
waitall
)
{
size_t
i_total
=
0
;
...
...
@@ -282,13 +281,12 @@ net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
ufd
[
i
].
revents
=
0
;
}
switch
(
poll
(
ufd
,
fdc
,
timeout
?
timeout
:
500
))
switch
(
poll
(
ufd
,
fdc
,
500
))
{
case
-
1
:
goto
error
;
case
0
:
// timeout
if
(
timeout
)
return
i_total
;
continue
;
}
...
...
@@ -401,7 +399,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
,
b_retry
,
0
);
buf
,
len
,
b_retry
);
}
...
...
@@ -409,19 +407,16 @@ ssize_t __net_Read( vlc_object_t *restrict p_this, int fd,
* __net_Select:
*****************************************************************************
* Read from several sockets. Takes data from the first socket that has some.
* if timeout is zero, net_Select will wait indefinitely. timeout is in
* millisecond.
*****************************************************************************/
ssize_t
__net_Select
(
vlc_object_t
*
restrict
p_this
,
const
int
*
restrict
fds
,
int
nfd
,
uint8_t
*
restrict
buf
,
size_t
len
,
int
timeout
)
uint8_t
*
restrict
buf
,
size_t
len
)
{
const
v_socket_t
*
vsv
[
nfd
];
memset
(
vsv
,
0
,
sizeof
(
vsv
)
);
return
net_ReadInner
(
p_this
,
nfd
,
fds
,
vsv
,
buf
,
len
,
VLC_FALSE
,
timeout
);
buf
,
len
,
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