diff --git a/include/libssh2.h b/include/libssh2.h index 064f25c2..292e64e7 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -482,6 +482,7 @@ typedef struct _LIBSSH2_POLLFD { #define LIBSSH2_ERROR_ENCRYPT -44 #define LIBSSH2_ERROR_BAD_SOCKET -45 #define LIBSSH2_ERROR_KNOWN_HOSTS -46 +#define LIBSSH2_ERROR_CHANNEL_WINDOW_FULL -47 /* this is a define to provide the old (<= 1.2.7) name */ #define LIBSSH2_ERROR_BANNER_NONE LIBSSH2_ERROR_BANNER_RECV diff --git a/src/channel.c b/src/channel.c index fa7e6d34..b708dd43 100644 --- a/src/channel.c +++ b/src/channel.c @@ -2259,7 +2259,7 @@ static int channel_wait_eof(LIBSSH2_CHANNEL *channel) if ((channel->remote.window_size == channel->read_avail) && session->api_block_mode) - return _libssh2_error(session, LIBSSH2_ERROR_BUFFER_TOO_SMALL, + return _libssh2_error(session, LIBSSH2_ERROR_CHANNEL_WINDOW_FULL, "Receiving channel window has been exhausted"); rc = _libssh2_transport_read(session);