[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE |
Date: |
Fri, 9 Dec 2011 15:35:54 +0100 |
Gary Spivey <address@hidden> 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] Incoming packet bigger than PBUF_POOL_BUFSIZE, Gary Spivey, 2011/12/07
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, web, 2011/12/07
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, Gary Spivey, 2011/12/07
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, Bill Auerbach, 2011/12/08
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, Gary Spivey, 2011/12/08
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, Kieran Mansley, 2011/12/08
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, Gary Spivey, 2011/12/08
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, Gary Spivey, 2011/12/08
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, address@hidden, 2011/12/09
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE,
Simon Goldschmidt <=
- Re: [lwip-users] Incoming packet bigger than PBUF_POOL_BUFSIZE, Simon Goldschmidt, 2011/12/09