[vlc-commits] [Git][videolan/vlc][master] access: sftp: replace deprecated libssh2_session_startup

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Dec 6 12:53:47 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
86d606dc by Abderhman Gamal at 2025-12-06T12:33:04+00:00
access: sftp: replace deprecated libssh2_session_startup

Use libssh2_session_handshake() instead of libssh2_session_startup()
which was deprecated in libssh2 1.2.8.

Signed-off-by: Abderhman Gamal <abderhmangamal246 at gmail.com>

- - - - -


1 changed file:

- modules/access/sftp.c


Changes:

=====================================
modules/access/sftp.c
=====================================
@@ -245,9 +245,13 @@ static int SSHSessionInit( stream_t *p_access, const char *psz_host, int i_port
         goto error;
 
     int i_ret;
+    #if LIBSSH2_VERSION_NUM >= 0x010208
+    while( ( i_ret = libssh2_session_handshake( p_sys->ssh_session, p_sys->i_socket ) )
+           == LIBSSH2_ERROR_EAGAIN );
+    #else
     while( ( i_ret = libssh2_session_startup( p_sys->ssh_session, p_sys->i_socket ) )
            == LIBSSH2_ERROR_EAGAIN );
-
+    #endif            
     if( i_ret != 0 )
         goto error;
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/86d606dcd550a74f37a6b0aaa1a41c99c854c49e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/86d606dcd550a74f37a6b0aaa1a41c99c854c49e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list