Commit 79a6feae authored by Petri Hintukainen's avatar Petri Hintukainen Committed by Jean-Baptiste Kempf

sftp: error out if net_Connect fails

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit bd306466c8535a807725df88caf6dd79698f8234)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 043d17af
...@@ -144,6 +144,11 @@ static int Open( vlc_object_t* p_this ) ...@@ -144,6 +144,11 @@ static int Open( vlc_object_t* p_this )
/* Connect to the server using a regular socket */ /* Connect to the server using a regular socket */
p_sys->i_socket = net_Connect( p_access, url.psz_host, i_port, SOCK_STREAM, 0 ); p_sys->i_socket = net_Connect( p_access, url.psz_host, i_port, SOCK_STREAM, 0 );
if( p_sys->i_socket < 0 )
{
msg_Err( p_access, "Impossible to open the connection to %s:%i", url.psz_host, i_port );
goto error;
}
/* Create the ssh connexion and wait until the server answer */ /* Create the ssh connexion and wait until the server answer */
if( ( p_sys->ssh_session = libssh2_session_init() ) == NULL ) if( ( p_sys->ssh_session = libssh2_session_init() ) == NULL )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment