1
1

_libssh2_packet_add: adjust window size when truncating

When receiving more data than what the window size allows on a
particular channel, make sure that the window size is adjusted in that
case too. Previously it would only adjust the window in the non-error
case.
Этот коммит содержится в:
liuzl 2011-08-30 23:56:50 +02:00 коммит произвёл Daniel Stenberg
родитель 689fc5c596
Коммит 9e79031ad7

Просмотреть файл

@ -706,6 +706,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
"Remote sent more data than current " "Remote sent more data than current "
"window allows, truncating"); "window allows, truncating");
datalen = channelp->remote.window_size + data_head; datalen = channelp->remote.window_size + data_head;
channelp->remote.window_size = 0;
} }
else else
/* Now that we've received it, shrink our window */ /* Now that we've received it, shrink our window */