net/tcp: correct the cache output

Change-Id: I30e9352ca9c032e707a86f327c902a976f0cb375
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-03-11 12:26:20 +08:00
committed by chao an
parent 9866f01908
commit 6ef7435082
+7
View File
@@ -521,6 +521,7 @@ found:
dev->d_len += hdrlen;
tcp_input_cache(dev, conn, iplen);
dev->d_len -= hdrlen;
tcp_send(dev, conn, TCP_ACK, tcpiplen);
return;
@@ -1165,6 +1166,12 @@ static void tcp_process_cache(FAR struct net_driver_s *dev, uint8_t domain,
tcp_input(dev, domain, iplen, NULL);
if (dev->d_len > 0)
{
d_len = dev->d_len;
memcpy(d_buf, dev->d_buf, d_len);
}
iob_free_queue(iob, &conn->pendingahead,
IOBUSER_NET_TCP_PENDINGAHEAD);