mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-07-10 04:48:21 +08:00
Merge branch 'bugfix/fix_lwip_mt' into 'master'
feat(lwip): Fix UDP recv NULL package See merge request sdk/ESP8266_RTOS_SDK!271
This commit is contained in:
@ -106,6 +106,7 @@ int lwip_fcntl_mt(int s, int cmd, int val);
|
||||
#define read(a,b,c) lwip_read_mt(a,b,c)
|
||||
#define write(a,b,c) lwip_write_mt(a,b,c)
|
||||
#define close(s) lwip_close_mt(s)
|
||||
#define closesocket(s) lwip_close_mt(s)
|
||||
#define fcntl(a,b,c) lwip_fcntl_mt(a,b,c)
|
||||
#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */
|
||||
|
||||
|
@ -571,7 +571,14 @@ netconn_recv_data(struct netconn *conn, void **new_buf)
|
||||
#endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */
|
||||
#if (LWIP_UDP || LWIP_RAW)
|
||||
{
|
||||
#ifdef SOCKETS_MT
|
||||
if (!buf) {
|
||||
API_EVENT(conn, NETCONN_EVT_ERROR, 0);
|
||||
return ERR_CLSD;
|
||||
}
|
||||
#else
|
||||
LWIP_ASSERT("buf != NULL", buf != NULL);
|
||||
#endif
|
||||
len = netbuf_len((struct netbuf*)buf);
|
||||
}
|
||||
#endif /* (LWIP_UDP || LWIP_RAW) */
|
||||
|
Reference in New Issue
Block a user