diff --git a/srcs/lwip/src/arch_linux/include/lwipopts.h b/srcs/lwip/src/arch_linux/include/lwipopts.h index 5ace1e9..c681f5a 100644 --- a/srcs/lwip/src/arch_linux/include/lwipopts.h +++ b/srcs/lwip/src/arch_linux/include/lwipopts.h @@ -177,7 +177,7 @@ /** * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ -#define PBUF_POOL_SIZE 10000 +#define PBUF_POOL_SIZE 8 /* --------------------------------- @@ -477,7 +477,7 @@ void sys_unlock_tcpip_core(void); #define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH) //#define ETHARP_DEBUG LWIP_DBG_ON -#define NETIF_DEBUG LWIP_DBG_ON +//#define NETIF_DEBUG LWIP_DBG_ON //#define PBUF_DEBUG LWIP_DBG_ON //#define API_LIB_DEBUG LWIP_DBG_ON //#define API_MSG_DEBUG LWIP_DBG_ON @@ -502,7 +502,7 @@ void sys_unlock_tcpip_core(void); //#define TCP_QLEN_DEBUG LWIP_DBG_ON //#define UDP_DEBUG LWIP_DBG_ON //#define TCPIP_DEBUG LWIP_DBG_ON -#define PPP_DEBUG LWIP_DBG_ON +//#define PPP_DEBUG LWIP_DBG_ON //#define SLIP_DEBUG LWIP_DBG_ON //#define DHCP_DEBUG LWIP_DBG_ON //#define AUTOIP_DEBUG LWIP_DBG_ON diff --git a/srcs/lwip/src/core/pbuf.c b/srcs/lwip/src/core/pbuf.c index 7638dfd..5d6ca20 100644 --- a/srcs/lwip/src/core/pbuf.c +++ b/srcs/lwip/src/core/pbuf.c @@ -750,7 +750,11 @@ pbuf_free(struct pbuf *p) * further protection. */ SYS_ARCH_PROTECT(old_level); /* all pbufs in a chain are referenced at least once */ - LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); + //LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); + if(p->ref == 0) { + return 1; + } + /* decrease reference count (number of pointers to pbuf) */ ref = --(p->ref); SYS_ARCH_UNPROTECT(old_level);