mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 04:54:38 +08:00
fixed compiling pbuf.c with LWIP_TCP==0
This commit is contained in:
parent
082fe71c0c
commit
7defe372b9
@ -110,20 +110,6 @@
|
|||||||
volatile u8_t pbuf_free_ooseq_pending;
|
volatile u8_t pbuf_free_ooseq_pending;
|
||||||
#define PBUF_POOL_IS_EMPTY() pbuf_pool_is_empty()
|
#define PBUF_POOL_IS_EMPTY() pbuf_pool_is_empty()
|
||||||
|
|
||||||
/* Initialize members of struct pbuf after allocation */
|
|
||||||
static void
|
|
||||||
pbuf_init_alloced_pbuf(struct pbuf *p, void* payload, u16_t tot_len, u16_t len, u8_t type)
|
|
||||||
{
|
|
||||||
p->next = NULL;
|
|
||||||
p->payload = payload;
|
|
||||||
p->tot_len = tot_len;
|
|
||||||
p->len = len;
|
|
||||||
p->type = type;
|
|
||||||
p->flags = 0;
|
|
||||||
p->ref = 1;
|
|
||||||
p->if_idx = NETIF_NO_INDEX;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to reclaim some memory from queued out-of-sequence TCP segments
|
* Attempt to reclaim some memory from queued out-of-sequence TCP segments
|
||||||
* if we run out of pool pbufs. It's better to give priority to new packets
|
* if we run out of pool pbufs. It's better to give priority to new packets
|
||||||
@ -186,6 +172,20 @@ pbuf_pool_is_empty(void)
|
|||||||
}
|
}
|
||||||
#endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */
|
#endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */
|
||||||
|
|
||||||
|
/* Initialize members of struct pbuf after allocation */
|
||||||
|
static void
|
||||||
|
pbuf_init_alloced_pbuf(struct pbuf *p, void* payload, u16_t tot_len, u16_t len, u8_t type)
|
||||||
|
{
|
||||||
|
p->next = NULL;
|
||||||
|
p->payload = payload;
|
||||||
|
p->tot_len = tot_len;
|
||||||
|
p->len = len;
|
||||||
|
p->type = type;
|
||||||
|
p->flags = 0;
|
||||||
|
p->ref = 1;
|
||||||
|
p->if_idx = NETIF_NO_INDEX;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup pbuf
|
* @ingroup pbuf
|
||||||
* Allocates a pbuf of the given type (possibly a chain for PBUF_POOL type).
|
* Allocates a pbuf of the given type (possibly a chain for PBUF_POOL type).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user