Skip to content

Commit 874ce16

Browse files
committed
transports: ssh: replace deprecated function libssh2_session_startup
The function `libssh2_session_startup` has been deprecated since libssh2 version 1.2.8 in favor of `libssh2_session_handshake` introduced in the same version. libssh2 1.2.8 was released in April 2011, so it is already seven years old. It is available in Debian Wheezy, Ubuntu Trusty and CentOS 7.4, so the most important and conservative distros already have it available. As such, it seems safe to just use the new function.
1 parent 2785cc8 commit 874ce16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transports/ssh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ static int _git_ssh_session_create(
490490
}
491491

492492
do {
493-
rc = libssh2_session_startup(s, socket->s);
493+
rc = libssh2_session_handshake(s, socket->s);
494494
} while (LIBSSH2_ERROR_EAGAIN == rc || LIBSSH2_ERROR_TIMEOUT == rc);
495495

496496
if (rc != LIBSSH2_ERROR_NONE) {

0 commit comments

Comments
 (0)