mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
pbuf: fix undefined PBUF_POOL_FREE_OOSEQ if TCP_QUEUE_OOSEQ is disabled
lwip/src/core/timers.c: In function ‘sys_check_timeouts’: lwip/src/core/timers.c:328:5: error: "PBUF_POOL_FREE_OOSEQ" is not defined [-Werror=undef] #if PBUF_POOL_FREE_OOSEQ Fix it by declaring an empty PBUF_CHECK_FREE_OOSEQ() function if feature is not enabled.
This commit is contained in:
parent
73b8026cb9
commit
1dcd5d31d7
@ -325,9 +325,7 @@ sys_check_timeouts(void)
|
|||||||
/* this cares for wraparounds */
|
/* this cares for wraparounds */
|
||||||
diff = now - timeouts_last_time;
|
diff = now - timeouts_last_time;
|
||||||
do {
|
do {
|
||||||
#if PBUF_POOL_FREE_OOSEQ
|
|
||||||
PBUF_CHECK_FREE_OOSEQ();
|
PBUF_CHECK_FREE_OOSEQ();
|
||||||
#endif /* PBUF_POOL_FREE_OOSEQ */
|
|
||||||
had_one = 0;
|
had_one = 0;
|
||||||
tmptimeout = next_timeout;
|
tmptimeout = next_timeout;
|
||||||
if (tmptimeout && (tmptimeout->time <= diff)) {
|
if (tmptimeout && (tmptimeout->time <= diff)) {
|
||||||
|
@ -164,12 +164,11 @@ struct pbuf_custom {
|
|||||||
};
|
};
|
||||||
#endif /* LWIP_SUPPORT_CUSTOM_PBUF */
|
#endif /* LWIP_SUPPORT_CUSTOM_PBUF */
|
||||||
|
|
||||||
#if LWIP_TCP && TCP_QUEUE_OOSEQ
|
|
||||||
/** Define this to 0 to prevent freeing ooseq pbufs when the PBUF_POOL is empty */
|
/** Define this to 0 to prevent freeing ooseq pbufs when the PBUF_POOL is empty */
|
||||||
#ifndef PBUF_POOL_FREE_OOSEQ
|
#ifndef PBUF_POOL_FREE_OOSEQ
|
||||||
#define PBUF_POOL_FREE_OOSEQ 1
|
#define PBUF_POOL_FREE_OOSEQ 1
|
||||||
#endif /* PBUF_POOL_FREE_OOSEQ */
|
#endif /* PBUF_POOL_FREE_OOSEQ */
|
||||||
#if NO_SYS && PBUF_POOL_FREE_OOSEQ
|
#if LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ
|
||||||
extern volatile u8_t pbuf_free_ooseq_pending;
|
extern volatile u8_t pbuf_free_ooseq_pending;
|
||||||
void pbuf_free_ooseq(void);
|
void pbuf_free_ooseq(void);
|
||||||
/** When not using sys_check_timeouts(), call PBUF_CHECK_FREE_OOSEQ()
|
/** When not using sys_check_timeouts(), call PBUF_CHECK_FREE_OOSEQ()
|
||||||
@ -179,8 +178,10 @@ void pbuf_free_ooseq(void);
|
|||||||
/* pbuf_alloc() reported PBUF_POOL to be empty -> try to free some \
|
/* pbuf_alloc() reported PBUF_POOL to be empty -> try to free some \
|
||||||
ooseq queued pbufs now */ \
|
ooseq queued pbufs now */ \
|
||||||
pbuf_free_ooseq(); }}while(0)
|
pbuf_free_ooseq(); }}while(0)
|
||||||
#endif /* NO_SYS && PBUF_POOL_FREE_OOSEQ*/
|
#else /* LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ */
|
||||||
#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ */
|
/* Otherwise declare an empty PBUF_CHECK_FREE_OOSEQ */
|
||||||
|
#define PBUF_CHECK_FREE_OOSEQ()
|
||||||
|
#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ*/
|
||||||
|
|
||||||
/* Initializes the pbuf module. This call is empty for now, but may not be in future. */
|
/* Initializes the pbuf module. This call is empty for now, but may not be in future. */
|
||||||
#define pbuf_init()
|
#define pbuf_init()
|
||||||
|
Loading…
Reference in New Issue
Block a user