In keeping with pbuf->ref always having the count of the number of pointers

to the particular buffer (and the last rewrite of pbuf_free), changed most
pbuf_ref_chain() calls back to pbuf_ref(). I think this was causing some pbuf
leaks.
This commit is contained in:
davidhaas 2003-03-31 22:10:09 +00:00
parent a0d1650876
commit b484f95228
2 changed files with 3 additions and 3 deletions

View File

@ -367,7 +367,7 @@ low_level_output(struct netif *netif, struct pbuf *p)
} else {
/* Increment use count on pbuf */
pbuf_ref_chain(p);
pbuf_ref(p);
/* Put buffers on descriptor ring, but don't mark them as ready yet */
tx_insert_eof = tx_insert_sof = mcf5272->tx_insert;

View File

@ -293,7 +293,7 @@ unixif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
buf->payload = p->payload;
if(list_elems(unixif->q) == 0) {
pbuf_ref_chain(p);
pbuf_ref(p);
list_push(unixif->q, buf);
sys_timeout((double)p->tot_len * 8000.0 / UNIXIF_BPS, unixif_output_timeout,
netif);
@ -301,7 +301,7 @@ unixif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
DEBUGF(UNIXIF_DEBUG, ("unixif_output: first on list\n"));
} else {
pbuf_ref_chain(p);
pbuf_ref(p);
if(list_push(unixif->q, buf) == 0) {
#ifdef UNIXIF_DROP_FIRST
struct unixif_buf *buf2;