From ee6671f22bd041a5c5f9a9918ae5881e57ac9816 Mon Sep 17 00:00:00 2001 From: ericQiang Date: Tue, 30 Apr 2019 00:22:17 +0800 Subject: [PATCH] =?UTF-8?q?[bug=20fix]=E4=B8=8D=E4=BD=BF=E8=83=BDLWIP?= =?UTF-8?q?=E7=9A=84TCP=E5=8A=9F=E8=83=BD=E6=97=B6=EF=BC=8C=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=87=BA=E9=94=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/net/lwip-2.0.2/src/api/api_lib.c | 2 +- components/net/lwip-2.1.0/src/api/api_lib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/net/lwip-2.0.2/src/api/api_lib.c b/components/net/lwip-2.0.2/src/api/api_lib.c index 3c1d6a6c27..7d9c12768d 100644 --- a/components/net/lwip-2.0.2/src/api/api_lib.c +++ b/components/net/lwip-2.0.2/src/api/api_lib.c @@ -175,12 +175,12 @@ netconn_delete(struct netconn *conn) API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; +#if LWIP_TCP #if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER /* get the time we started, which is later compared to sys_now() + conn->send_timeout */ API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now(); #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ -#if LWIP_TCP API_MSG_VAR_REF(msg).msg.sd.polls_left = ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1; #endif /* LWIP_TCP */ diff --git a/components/net/lwip-2.1.0/src/api/api_lib.c b/components/net/lwip-2.1.0/src/api/api_lib.c index e03b8b7451..5e9ceafa53 100644 --- a/components/net/lwip-2.1.0/src/api/api_lib.c +++ b/components/net/lwip-2.1.0/src/api/api_lib.c @@ -201,12 +201,12 @@ netconn_prepare_delete(struct netconn *conn) API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; +#if LWIP_TCP #if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER /* get the time we started, which is later compared to sys_now() + conn->send_timeout */ API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now(); #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ -#if LWIP_TCP API_MSG_VAR_REF(msg).msg.sd.polls_left = ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1; #endif /* LWIP_TCP */