diff --git a/components/net/lwip-1.3.2/src/lwipopts.h b/components/net/lwip-1.3.2/src/lwipopts.h index 98ee6b58f..0c5b49c77 100644 --- a/components/net/lwip-1.3.2/src/lwipopts.h +++ b/components/net/lwip-1.3.2/src/lwipopts.h @@ -95,11 +95,7 @@ #define mem_free rt_free #define mem_calloc rt_calloc -#ifdef RT_LWIP_USING_RT_MEM -#define MEMP_MEM_MALLOC 1 -#else -#define MEMP_MEM_MALLOC 0 -#endif +#define MEMP_MEM_MALLOC 0 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application sends a lot of data out of ROM (or other static memory), this diff --git a/components/net/lwip-1.3.2/src/netif/skeleton.c b/components/net/lwip-1.3.2/src/netif/skeleton.c index da7280a8a..52a2ba5a3 100644 --- a/components/net/lwip-1.3.2/src/netif/skeleton.c +++ b/components/net/lwip-1.3.2/src/netif/skeleton.c @@ -61,7 +61,7 @@ static rt_size_t rt_skeleton_write (rt_device_t dev, rt_off_t pos, const void* b return 0; } -static rt_err_t rt_skeleton_control(rt_device_t dev, rt_uint8_t cmd, void *args) +static rt_err_t rt_skeleton_control(rt_device_t dev, int cmd, void *args) { struct rt_skeleton_eth *eth; diff --git a/components/net/lwip-1.4.1/src/lwipopts.h b/components/net/lwip-1.4.1/src/lwipopts.h index e2fdb4708..755593388 100644 --- a/components/net/lwip-1.4.1/src/lwipopts.h +++ b/components/net/lwip-1.4.1/src/lwipopts.h @@ -86,11 +86,7 @@ #define mem_free rt_free #define mem_calloc rt_calloc -#ifdef RT_LWIP_USING_RT_MEM -#define MEMP_MEM_MALLOC 1 -#else #define MEMP_MEM_MALLOC 0 -#endif /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application sends a lot of data out of ROM (or other static memory), this diff --git a/components/net/lwip-2.0.2/src/api/sockets.c b/components/net/lwip-2.0.2/src/api/sockets.c index 54a3154ee..1a99f48fa 100644 --- a/components/net/lwip-2.0.2/src/api/sockets.c +++ b/components/net/lwip-2.0.2/src/api/sockets.c @@ -196,6 +196,11 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* #define SELWAIT_T u8_t #endif +#include +#ifdef RT_USING_DFS_NET +#include +#endif + /** Contains all internal pointers and states used for a socket */ struct lwip_sock { /** sockets currently are built on netconns, each socket has one netconn */ @@ -216,6 +221,10 @@ struct lwip_sock { u8_t err; /** counter of how many threads are waiting for this socket using select */ SELWAIT_T select_waiting; + +#ifdef RT_USING_DFS_NET + rt_wqueue_t wait_head; +#endif }; #if LWIP_NETCONN_SEM_PER_THREAD @@ -521,7 +530,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) return -1; } LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < NUM_SOCKETS + LWIP_SOCKET_OFFSET)); - LWIP_ASSERT("newconn->callback == event_callback", newconn->callback == event_callback); + // LWIP_ASSERT("newconn->callback == event_callback", newconn->callback == event_callback); nsock = &sockets[newsock - LWIP_SOCKET_OFFSET]; /* See event_callback: If data comes in right away after an accept, even diff --git a/components/net/lwip-2.0.2/src/lwipopts.h b/components/net/lwip-2.0.2/src/lwipopts.h index d846cf2fb..98aac01d5 100644 --- a/components/net/lwip-2.0.2/src/lwipopts.h +++ b/components/net/lwip-2.0.2/src/lwipopts.h @@ -93,11 +93,7 @@ //#define MEMP_USE_CUSTOM_POOLS 1 //#define MEM_SIZE (1024*64) -#ifdef RT_LWIP_USING_RT_MEM -#define MEMP_MEM_MALLOC 1 -#else #define MEMP_MEM_MALLOC 0 -#endif /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application sends a lot of data out of ROM (or other static memory), this diff --git a/components/net/netutils/telnet.c b/components/net/netutils/telnet.c index d5c127b71..a6dd2ed06 100644 --- a/components/net/netutils/telnet.c +++ b/components/net/netutils/telnet.c @@ -232,7 +232,7 @@ static rt_size_t telnet_write (rt_device_t dev, rt_off_t pos, const void* buffer return (rt_uint32_t) ptr - (rt_uint32_t) buffer; } -static rt_err_t telnet_control(rt_device_t dev, rt_uint8_t cmd, void *args) +static rt_err_t telnet_control(rt_device_t dev, int cmd, void *args) { return RT_EOK; }