Hello All,
What are the possible reasons of *libssh2_sftp_write* returning zero ?
My implementation follows this example. I have to check for rc<=0 or there
is an endless loop because the write function returns 0 all the time.
What's happening?
        *do* {
            */* write data in a loop until we block */ *
            *while*((rc = libssh2_sftp_write
<https://www.libssh2.org//libssh2_sftp_write.html>(sftp_handle, ptr,
nread)) ==
                   LIBSSH2_ERROR_EAGAIN) {
                waitsocket(sock, session);
            }
            *if*(rc < 0)
                *break*;
            ptr += rc;
            nread -= rc;
        } *while*(nread);
// San.
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2020-03-27