Gary Spivey <[email protected]> wrote: > if (bufsize) > { > // Allocate a chain of pbufs big enough to hold it > p = pbuf_alloc(PBUF_RAW, bufsize, PBUF_POOL); > // Set up our linked-list index > chainp = p; > // Now let's copy the data into our chain > while (bufsize) > { > // Don't read more than one buffer at a time > bytes_to_read = MINIMUM(bufsize, PBUF_POOL_BUFSIZE);
The last line is wrong: use 'chainp->len' instead of PBUF_POOL_BUFSIZE. The two are not always equal. Simon _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
