[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] pbuf_cat() does not update total_len
From: |
Laurenz Kamp |
Subject: |
[lwip-devel] pbuf_cat() does not update total_len |
Date: |
Tue, 03 Feb 2015 17:36:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hello,
let's assume I want to merge two pbufs into one and I use pbuf_cat() for the
task.
a and b are the pbufs I want to merge:
First pbuf: a.len = 10;
a.total_len = 10;
a.next = NULL;
Second pbuf: b.len = 15;
b.total_len = 15;
b.next = NULL;
After I call pbuf_cat(a, b), I have the following setup:
First pbuf: a.len = 10;
a.total_len = 25;
a.next = b;
Second pbuf: b.len = 15;
b.total_len = 15; <-- Should be 25.
b.next = NULL;
As far as I understand, all pbufs in a chain have the same total_len value, but
pbuf_cat doesn't
update b.total_len. Is this behavior intentioned or a bug?
Best regards,
Laurenz Kamp
- [lwip-devel] pbuf_cat() does not update total_len,
Laurenz Kamp <=