mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
net/tcp: correct the cache output
Change-Id: I30e9352ca9c032e707a86f327c902a976f0cb375 Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user