Subject: libssh2_sftp_init() returns LIBSSH2_ERROR_EAGAIN forever

libssh2_sftp_init() returns LIBSSH2_ERROR_EAGAIN forever

From: meneldor <meneldor_at_gmail.com>
Date: Mon, 30 Mar 2015 16:22:22 +0300

Hi again :)

Im trying to open LIBSSH2_SFTP session in non-blocking mode but it always
returns LIBSSH2_ERROR_EAGAIN. Here is the code:

     do {
        m_sftp_session = libssh2_sftp_init(m_ssh_session);
        if (!m_sftp_session) {
            if (libssh2_session_last_errno(m_ssh_session) ==
LIBSSH2_ERROR_EAGAIN){
                qDebug() << "waitsocket";
                waitsocket();
            } else{
                qDebug() << "Unable to init SFTP session";
                return false;
            }
        }
    } while (!m_sftp_session);

*m_ssh_session *is valid LIBSSH2_SESSION which i use
for libssh2_channel_open_session(m_ssh_session) without any problem.
Here is the trace log: http://pastebin.com/2uK6tqvB

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2015-03-30