mirror of
https://github.com/libssh2/libssh2.git
synced 2025-08-07 08:02:56 +03:00
LIBSSH2_ERROR_CHANNEL_WINDOW_FULL: add new error code
In order to signal that the requested operation can not succeed because the receiving window had been exhausted, the error code LIBSSH2_ERROR_BUFFER_TOO_SMALL has been reused but I have found that in certain context it may be ambigous. This patch introduces a new error code, LIBSSH2_ERROR_CHANNEL_WINDOW_FULL, exclusive to signal that condition.
This commit is contained in:
committed by
Alexander Lamaison
parent
fdfcb2f9e6
commit
84172e5188
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user