Hello,
I'm having a problem sending udp data through the sockets interface ;-)
I think part of it is because pbuf_chain() is updating tot_len
incorrectly.
Just to clarify, tot_len is "the sum of 'len' of all pbufs following
this one?"
Is the following correct?
(changed line marked by <<<<<<<)
void
pbuf_chain(struct pbuf *h, struct pbuf *t)
{
struct pbuf *p;
LWIP_ASSERT("h != NULL", h != NULL);
LWIP_ASSERT("t != NULL", t != NULL);
/* proceed to last pbuf of chain */
for (p = h; p != NULL; p = p->next) { <<<<<<<<
/* add total length of second chain to all totals of first chain */
p->tot_len += t->tot_len;
}
/* chain last pbuf of h chain (p) with first of tail (t) */
p->next = t;
/* t is now referenced to one more time */
pbuf_ref(t);
DEBUGF(PBUF_DEBUG | DBG_FRESH | 2, ("pbuf_chain: referencing tail
%p\n", (void *) t));
}
_______________________________________________
lwip-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-users