tcp_enqueue: pcb->snd_queuelen didn't work for chaine PBUF_RAMs: changed snd_queuelen++ to snd_queuelen += pbuf_clen(p).

This commit is contained in:
goldsimon 2007-07-25 08:46:41 +00:00
parent 328b25d561
commit 8be76ed450
2 changed files with 7 additions and 3 deletions

View File

@ -252,6 +252,10 @@ HISTORY
++ Bug fixes:
2007-07-25 Simon Goldschmidt
* tcp_out.c: tcp_enqueue: pcb->snd_queuelen didn't work for chaine PBUF_RAMs:
changed snd_queuelen++ to snd_queuelen += pbuf_clen(p).
2007-07-24 Simon Goldschmidt
* api_msg.c, tcp.c: Fix bug #20480: Check the pcb passed to tcp_listen() for the
correct state (must be CLOSED).

View File

@ -216,7 +216,7 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,
}
LWIP_ASSERT("check that first pbuf can hold optlen",
(seg->p->len >= optlen));
++queuelen;
queuelen += pbuf_clen(seg->p);
seg->dataptr = seg->p->payload;
}
/* copy from volatile memory? */
@ -227,7 +227,7 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,
}
LWIP_ASSERT("check that first pbuf can hold the complete seglen",
(seg->p->len >= seglen));
++queuelen;
queuelen += pbuf_clen(seg->p);
if (arg != NULL) {
MEMCPY(seg->p->payload, ptr, seglen);
}
@ -257,7 +257,7 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_enqueue: could not allocate memory for header pbuf\n"));
goto memerr;
}
++queuelen;
queuelen += pbuf_clen(seg->p);
/* Concatenate the headers and data pbufs together. */
pbuf_cat(seg->p/*header*/, p/*data*/);