Attention is currently required from: jolly, laforge.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40584?usp=email )
Change subject: Avoid reusing pending buffer; append incoming data instead ......................................................................
Patch Set 5: Code-Review-1
(2 comments)
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/9d8103ce_38c932d7?u... : PS5, Line 338: pending = iofd_msgb_alloc2(iofd, msgb_length(iofd->pending) + msgb_length(msg)); AFAICT this is not fullfilling the requirement that:
(msgb_length(iofd->pending) + msgb_length(msg)) >= iofd->msgb_alloc.size)
What I meant: msgb_length(iofd->pending) + msgb_length(msg) may be lower than iofd->msgb_alloc.size, which means user will end up with a msgb smaller than expected.
File src/core/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/d844b3a0_60f477c0?u... : PS5, Line 156: struct msgb *iofd_msgb_alloc2(struct osmo_io_fd *iofd, size_t extra); this pnew param is named "size" now in the .c file.