andrzej-kaczmarek commented on code in PR #1848:
URL: https://github.com/apache/mynewt-nimble/pull/1848#discussion_r1713011978
##########
porting/nimble/src/os_mbuf.c:
##########
@@ -633,19 +626,20 @@ os_mbuf_adj(struct os_mbuf *mp, int req_len)
* after the remaining size.
*/
len = -len;
+ if (m->om_len >= len) {
+ m->om_len -= len;
+ if (OS_MBUF_IS_PKTHDR(mp))
+ OS_MBUF_PKTHDR(mp)->omp_len -= len;
+ return;
+ }
Review Comment:
this will trim the length of 1st mbuf in chain instead of the last one
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]