net/tcp: fix invaild application preload

Change-Id: Ifebe4c2715ccfc0e11d8b45792d51912f110d92e
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-03-02 23:15:27 +08:00
committed by chao an
parent 465f98384b
commit 60f7f71e6c
2 changed files with 13 additions and 2 deletions
+4 -2
View File
@@ -319,8 +319,10 @@ uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer,
/* Provide notification(s) that additional TCP read-ahead data is
* available.
*/
tcp_readahead_signal(conn);
if (queue == &conn->readahead)
{
tcp_readahead_signal(conn);
}
#endif
ninfo("Buffered %d bytes\n", buflen);
+9
View File
@@ -1150,6 +1150,15 @@ static void tcp_process_cache(FAR struct net_driver_s *dev, uint8_t domain,
dev->d_len = iob->io_pktlen - NET_LL_HDRLEN(dev);
if (IFF_IS_IPv4(dev->d_flags))
{
tcp_ipv4_select(dev);
}
else
{
tcp_ipv6_select(dev);
}
tcp_input(dev, domain, iplen, NULL);
iob_free_queue(iob, &conn->pendingahead,