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
7934d7aa
Commit
7934d7aa
authored
Mar 23, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed net_Read and net_Write (poll can be interrupted).
parent
c0961678
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/network/io.c
src/network/io.c
+7
-2
No files found.
src/network/io.c
View file @
7934d7aa
...
...
@@ -296,6 +296,8 @@ net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
switch
(
poll
(
ufd
,
fdc
,
500
))
{
case
-
1
:
if
(
errno
==
EINTR
)
continue
;
goto
error
;
case
0
:
// timeout
...
...
@@ -320,13 +322,14 @@ net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
}
else
{
if
(
ufd
[
i
].
revents
&
POLLRDHUP
)
if
(
ufd
[
i
].
revents
&
POLLRDHUP
)
return
0
;
// EOF, read() would yield 0
}
fdc
=
1
;
fdv
+=
i
;
vsv
+=
i
;
break
;
}
...
...
@@ -378,7 +381,7 @@ net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
p_buf
+=
n
;
i_buflen
-=
n
;
if
((
n
==
0
)
||
!
waitall
)
if
(
n
==
0
||
!
waitall
)
break
;
}
return
i_total
;
...
...
@@ -443,6 +446,8 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
switch
(
val
)
{
case
-
1
:
if
(
errno
==
EINTR
)
continue
;
msg_Err
(
p_this
,
"Write error: %s"
,
net_strerror
(
net_errno
));
goto
out
;
...
...
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