[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] UDP pbuf->next problem?
From: |
Daniel Berenguer |
Subject: |
Re: [lwip-users] UDP pbuf->next problem? |
Date: |
Thu, 15 Apr 2010 15:48:16 +0200 |
Ups...
Thanks Kleran, this seems to have solved the problem (so many hours lost...)
Daniel.
On 15 April 2010 11:31, Kieran Mansley <address@hidden> wrote:
> On Thu, 2010-04-15 at 11:07 +0200, Daniel Berenguer wrote:
>> memcpy(myBuf, p->payload, p->len);
>> bufLen += p->len;
>>
>> // Commenting this block avoids the problem
>> while((p->len != p->tot_len) && (p->next != NULL))
>> {
>> p = p->next;
>> memcpy(myBuf+bufLen , p->payload, p->len);
>> bufLen += p->len;
>> }
>>
>> myBuf[bufLen] = 0;
>> pbuf_free(p);
>
> I think you need to call pbuf_free() on the first pbuf in the chain, not
> just the last one.
>
> Kieran
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>