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
5681eec0
Commit
5681eec0
authored
Jun 30, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tcp: use vlc_recv_i11e() and add missing I/O error handling
parent
18a5cc0a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
modules/access/tcp.c
modules/access/tcp.c
+9
-2
No files found.
modules/access/tcp.c
View file @
5681eec0
...
...
@@ -29,11 +29,13 @@
# include "config.h"
#endif
#include <errno.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_network.h>
#include <vlc_interrupt.h>
/*****************************************************************************
* Module descriptor
...
...
@@ -138,11 +140,16 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
if
(
p_access
->
info
.
b_eof
)
return
0
;
i_read
=
net_Read
(
p_access
,
p_sys
->
fd
,
p_buffer
,
i_len
,
false
);
i_read
=
vlc_recv_i11e
(
p_sys
->
fd
,
p_buffer
,
i_len
,
0
);
if
(
i_read
==
0
)
p_access
->
info
.
b_eof
=
true
;
else
if
(
i_read
>
0
)
p_access
->
info
.
i_pos
+=
i_read
;
else
if
(
errno
!=
EINTR
&&
errno
!=
EAGAIN
)
{
msg_Err
(
p_access
,
"receive error: %s"
,
vlc_strerror_c
(
errno
)
);
p_access
->
info
.
b_eof
=
true
;
}
return
i_read
;
}
...
...
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