From 2b5868bfffba04aa7c9bcc50ee1cb342537f4e07 Mon Sep 17 00:00:00 2001 From: wangxujie Date: Fri, 28 Feb 2025 13:31:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=80=9A=E8=AE=AF=E8=B6=85?= =?UTF-8?q?=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MDK-ARM/semi-finished_product_testing.uvoptx | 7 ++++++- User/application/src/tcpserverc.c | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MDK-ARM/semi-finished_product_testing.uvoptx b/MDK-ARM/semi-finished_product_testing.uvoptx index 87c1654..3590bfd 100644 --- a/MDK-ARM/semi-finished_product_testing.uvoptx +++ b/MDK-ARM/semi-finished_product_testing.uvoptx @@ -265,6 +265,11 @@ 1 ip_addr + + 23 + 1 + tcp_rx_data + @@ -1908,7 +1913,7 @@ User/application - 0 + 1 0 0 0 diff --git a/User/application/src/tcpserverc.c b/User/application/src/tcpserverc.c index 94f3435..d5994f8 100644 --- a/User/application/src/tcpserverc.c +++ b/User/application/src/tcpserverc.c @@ -209,8 +209,9 @@ static err_t tcpecho_recv_control(void *arg, struct tcp_pcb *tpcb, struct pbuf * /*2. 判断所要执行的操作 读或写指令*/ /*3. 对要发送的数据进行校验,组包,返回数据*/ - pbuf_free(p); + } + pbuf_free(p); } else if (err == ERR_OK) // 检测到对方主动关闭连接时,也会调用recv函数,此时p为空 {