www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: [PATCH] example/sftp_RW_nonblock: do not ignore LIBSSH2_ERROR_EAGAIN

[PATCH] example/sftp_RW_nonblock: do not ignore LIBSSH2_ERROR_EAGAIN

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 24 Oct 2011 16:35:05 +0200

Hi,

sftp_RW_nonblock.c does not handle LIBSSH2_ERROR_EAGAIN, which causes
the password authentication to fail. I fixed the example by taking the
appropriate code from sftp_nonblock.c. Note that sftp_nonblock.c does
not call select() while looping around libssh2_session_handshake(),
libssh2_userauth_password(), libssh2_userauth_publickey_fromfile() and
libssh2_session_disconnect() -- is that intentionally? (the call of
libssh2_userauth_publickey_fromfile() is dead code anyway...)

Kamil

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2011-10-24

the libssh2 team