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
18a5cc0a
Commit
18a5cc0a
authored
Jun 30, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ftp: use vlc_recv_i11e() and add missing I/O error handling
parent
47d09400
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
modules/access/ftp.c
modules/access/ftp.c
+11
-5
No files found.
modules/access/ftp.c
View file @
18a5cc0a
...
@@ -30,20 +30,20 @@
...
@@ -30,20 +30,20 @@
# include "config.h"
# include "config.h"
#endif
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <assert.h>
#include <assert.h>
#include <errno.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_access.h>
#include <vlc_dialog.h>
#include <vlc_dialog.h>
#include <vlc_input_item.h>
#include <vlc_input_item.h>
#include <vlc_network.h>
#include <vlc_network.h>
#include <vlc_url.h>
#include <vlc_url.h>
#include <vlc_tls.h>
#include <vlc_tls.h>
#include <vlc_sout.h>
#include <vlc_sout.h>
#include <vlc_charset.h>
#include <vlc_charset.h>
#include <vlc_interrupt.h>
#ifndef IPPORT_FTP
#ifndef IPPORT_FTP
# define IPPORT_FTP 21u
# define IPPORT_FTP 21u
...
@@ -830,11 +830,17 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
...
@@ -830,11 +830,17 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
if
(
p_sys
->
data
.
p_tls
!=
NULL
)
if
(
p_sys
->
data
.
p_tls
!=
NULL
)
i_read
=
vlc_tls_Read
(
p_sys
->
data
.
p_tls
,
p_buffer
,
i_len
,
false
);
i_read
=
vlc_tls_Read
(
p_sys
->
data
.
p_tls
,
p_buffer
,
i_len
,
false
);
else
else
i_read
=
net_Read
(
p_access
,
p_sys
->
data
.
fd
,
p_buffer
,
i_len
,
false
);
i_read
=
vlc_recv_i11e
(
p_sys
->
data
.
fd
,
p_buffer
,
i_len
,
0
);
if
(
i_read
==
0
)
if
(
i_read
==
0
)
p_access
->
info
.
b_eof
=
true
;
p_access
->
info
.
b_eof
=
true
;
else
if
(
i_read
>
0
)
else
if
(
i_read
>
0
)
p_access
->
info
.
i_pos
+=
i_read
;
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
;
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