Browse Source

ftp: Don't assert on a valid connection handle in Read()

When seeking, if the reconnection fails, the connection handle will be
NULL. Instead, try to reconnect and signal EOF if this can't be done.

(cherry picked from commit dde0b69477)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
pull/135/head
Hugo Beauzée-Luyssen 9 years ago
parent
commit
188a032c67
  1. 3
      modules/access/ftp.c

3
modules/access/ftp.c

@ -900,7 +900,8 @@ static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len )
{
access_sys_t *p_sys = p_access->p_sys;
assert( p_sys->data != NULL );
if( p_sys->data == NULL )
return 0;
assert( !p_sys->out );
ssize_t i_read = vlc_tls_Read( p_sys->data, p_buffer, i_len, false );

Loading…
Cancel
Save