From 718dd008f3d9a77e2fda411d5a6d4bd93b780ee7 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Thu, 22 Oct 2020 04:50:26 +0000 Subject: [PATCH] add some debugging for understanding how these flags are set.. --- libssh2/src/transport.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libssh2/src/transport.c b/libssh2/src/transport.c index 0723b77..dbee285 100644 --- a/libssh2/src/transport.c +++ b/libssh2/src/transport.c @@ -376,6 +376,8 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session) if((nread < 0) && (nread == -EAGAIN)) { session->socket_block_directions |= LIBSSH2_SESSION_BLOCK_INBOUND; + _libssh2_debug(session, LIBSSH2_TRACE_SOCKET, + "setting INBOUND flag, nread: %d", nread); return LIBSSH2_ERROR_EAGAIN; } _libssh2_debug(session, LIBSSH2_TRACE_SOCKET, @@ -411,6 +413,8 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session) check is only done for the initial block since once we have got the start of a block we can in fact deal with fractions */ + _libssh2_debug(session, LIBSSH2_TRACE_SOCKET, + "setting INBOUND flag, numbytes: %d, blocksize: %d", numbytes, blocksize); session->socket_block_directions |= LIBSSH2_SESSION_BLOCK_INBOUND; return LIBSSH2_ERROR_EAGAIN;