Skip to content

Commit ee6671f

Browse files
committed
[bug fix]不使能LWIP的TCP功能时,编译出错。
1 parent 28e06fe commit ee6671f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/net/lwip-2.0.2/src/api/api_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ netconn_delete(struct netconn *conn)
175175

176176
API_MSG_VAR_ALLOC(msg);
177177
API_MSG_VAR_REF(msg).conn = conn;
178+
#if LWIP_TCP
178179
#if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER
179180
/* get the time we started, which is later compared to
180181
sys_now() + conn->send_timeout */
181182
API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now();
182183
#else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
183-
#if LWIP_TCP
184184
API_MSG_VAR_REF(msg).msg.sd.polls_left =
185185
((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1;
186186
#endif /* LWIP_TCP */

components/net/lwip-2.1.0/src/api/api_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ netconn_prepare_delete(struct netconn *conn)
201201

202202
API_MSG_VAR_ALLOC(msg);
203203
API_MSG_VAR_REF(msg).conn = conn;
204+
#if LWIP_TCP
204205
#if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER
205206
/* get the time we started, which is later compared to
206207
sys_now() + conn->send_timeout */
207208
API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now();
208209
#else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
209-
#if LWIP_TCP
210210
API_MSG_VAR_REF(msg).msg.sd.polls_left =
211211
((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1;
212212
#endif /* LWIP_TCP */

0 commit comments

Comments
 (0)