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

Archive Index This month's Index

Subject: libssh2_session_block_directions

libssh2_session_block_directions

From: double <ninive_at_gmx.at>
Date: Wed, 12 Aug 2009 18:35:44 +0200

Hello,

The down below pseudo-code fires the ASSERT. Is this a
small bug?
We are using "libssh2-1.1.1-20090626.tar.gz".

Thanks
Marcus

while( (rc = libssh2_sftp_read(sftp_handle, buffer, sizeof(buffer))) ==
LIBSSH2_ERROR_EAGAIN )
{
        int direction = libssh2_session_block_directions( session );
        if( direction & LIBSSH2_SESSION_BLOCK_INBOUND )
            wait = READ;
        else if( direction & LIBSSH2_SESSION_BLOCK_OUTBOUND )
            wait = WRITE;
        else
            ASSERT( false, "Could not figure out 'select direction'" );
}

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-08-12

the libssh2 team