net/tcp/sendfile: fixed an issue with unackseq calculation.

Wrong unackseq calculation locked conn->tx_unacked at non-zero values
even if all ACKs were received.
This issue is the same as it was with tcp_send_unbuffered.
This commit is contained in:
Alexander Lunev 2022-01-20 19:21:46 +03:00 committed by Xiang Xiao
parent c9e32dd4a4
commit 338b122b2b

View File

@ -692,8 +692,17 @@ found:
* data (tx_unacked).
*/
#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
#if defined(CONFIG_NET_TCP_WRITE_BUFFERS) && !defined(CONFIG_NET_SENDFILE)
unackseq = conn->sndseq_max;
#elif defined(CONFIG_NET_TCP_WRITE_BUFFERS) && defined(CONFIG_NET_SENDFILE)
if (!conn->sendfile)
{
unackseq = conn->sndseq_max;
}
else
{
unackseq = tcp_getsequence(conn->sndseq);
}
#else
unackseq = tcp_getsequence(conn->sndseq);
#endif