summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-05-05 18:18:08 +0800
committerGitHub <[email protected]>2019-05-05 18:18:08 +0800
commitdd1a906b6d18cd792919a7c824587c7b48483b91 (patch)
tree3bf33b27a8dfadfd60fc9c6537981ea451dfd169
parentc2244a5c57d5fd0dbc4697ed43f1a14bbe791398 (diff)
parentee6671f22bd041a5c5f9a9918ae5881e57ac9816 (diff)
Merge pull request #2638 from ericQiang/rtt_dev
[bug fix]不使能LWIP的TCP功能时,编译出错。
-rw-r--r--components/net/lwip-2.0.2/src/api/api_lib.c2
-rw-r--r--components/net/lwip-2.1.0/src/api/api_lib.c2
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 */