From e214cd4a7323e0326bb9a731c4effdbb4082c85f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 20 Oct 2010 23:31:34 +0200 Subject: SSH: use libssh2_session_handshake() In libssh2 1.2.8, libssh2_session_handshake() replaces libssh2_session_startup() to fix the previous portability problem with the socket type that was too small for win64 and thus easily could cause crashes and more. --- lib/ssh.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/ssh.c b/lib/ssh.c index ee63a7bd6..862ce76f6 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -496,6 +496,13 @@ static int sshkeycallback(CURL *easy, (libssh2_uint64_t)d, 0, 0) #endif +/* + * libssh2 1.2.8 fixed the problem with 32bit ints used for sockets on win64. + */ +#ifdef HAVE_LIBSSH2_SESSION_HANDSHAKE +#define libssh2_session_startup(x,y) libssh2_session_handshake(x,y) +#endif + /* * ssh_statemach_act() runs the SSH state machine as far as it can without * blocking and without reaching the end. The data the pointer 'block' points -- cgit v1.2.3