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
21ca2160
Commit
21ca2160
authored
Feb 28, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix POL.*HUP handling: POLLHUP is for writing,
POLLRDHUP is for reading (and also non-standard)
parent
610d3b49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
src/network/io.c
src/network/io.c
+6
-9
No files found.
src/network/io.c
View file @
21ca2160
...
...
@@ -309,15 +309,18 @@ net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
if
(
ufd
[
i
].
revents
==
0
)
continue
;
#ifdef POLLRHUP
/* This is nice but non-portable */
# define POLLRDHUP 0
#endif
if
(
i_total
>
0
)
{
// Errors (-1) and EOF (0) will be returned on next run
if
(
ufd
[
i
].
revents
&
(
POLLERR
|
POLLNVAL
|
POLLHUP
))
if
(
ufd
[
i
].
revents
&
(
POLLERR
|
POLLNVAL
|
POLL
RD
HUP
))
return
i_total
;
}
else
{
if
(
ufd
[
i
].
revents
&
POLLHUP
)
if
(
ufd
[
i
].
revents
&
POLL
RD
HUP
)
return
0
;
// EOF, read() would yield 0
}
...
...
@@ -443,25 +446,19 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
continue
;
}
if
((
ufd
[
0
].
revents
&
POLLERR
)
&&
(
i_total
>
0
))
if
((
ufd
[
0
].
revents
&
(
POLLERR
|
POLLNVAL
|
POLLHUP
)
)
&&
(
i_total
>
0
))
return
i_total
;
// error will be dequeued separately on next call
if
(
p_vs
!=
NULL
)
val
=
p_vs
->
pf_send
(
p_vs
->
p_sys
,
p_data
,
i_data
);
else
#if defined(WIN32) || defined(UNDER_CE)
val
=
send
(
fd
,
p_data
,
i_data
,
0
);
#else
val
=
write
(
fd
,
p_data
,
i_data
);
#endif
if
(
val
==
-
1
)
{
msg_Err
(
p_this
,
"Write error: %s"
,
net_strerror
(
net_errno
));
break
;
}
if
(
val
==
0
)
return
i_total
;
p_data
+=
val
;
i_data
-=
val
;
...
...
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