mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-02 10:53:16 +03:00
Handle Client-To-Server channel windowing.
This commit is contained in:
13
src/packet.c
13
src/packet.c
@@ -475,6 +475,19 @@ static int libssh2_packet_add(LIBSSH2_SESSION *session, unsigned char *data, siz
|
||||
return retval;
|
||||
}
|
||||
break;
|
||||
case SSH_MSG_CHANNEL_WINDOW_ADJUST:
|
||||
{
|
||||
LIBSSH2_CHANNEL *channel = libssh2_channel_locate(session, libssh2_ntohu32(data + 1));
|
||||
unsigned long bytestoadd = libssh2_ntohu32(data + 5);
|
||||
|
||||
if (channel && bytestoadd) {
|
||||
channel->local.window_size += bytestoadd;
|
||||
}
|
||||
|
||||
LIBSSH2_FREE(session, data);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
packet = LIBSSH2_ALLOC(session, sizeof(LIBSSH2_PACKET));
|
||||
|
||||
Reference in New Issue
Block a user