_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.
Этот коммит содержится в:
родитель
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 */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user