Attention is currently required from: arehbein, daniel, fixeria, jolly, pespin.
laforge has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/35068?usp=email )
Change subject: osmo_io: sendmsg/recvmsg support
......................................................................
Patch Set 10:
(1 comment)
File src/core/osmo_io_poll.c:
https://gerrit.osmocom.org/c/libosmocore/+/35068/comment/19033120_dff70a0e
PS10, Line 69: hdr.hdr.msg_control = alloca(iofd->cmsg_size);
why this change? where is hdr. […]
hdr.cmsg is
not set at all anywhere in this code path. hdr.cmsg is now a zero-length array at the end
of struct iofd_msghdr. If hdr is allocated dynamically on the heap, we can use
talloc_zero_size to include the desired cmsg size. Howve, here 'hdr' is on the
stack, so we also need to put the cmsg space on the stack which this line above is doing.
There is no need to initialzie it, as the cmsg is an *output* parameter from recvmsg to
us, and not input data we pass to ot.
iofd_handle_recv() processes the data, and afterwards the data on the stack is released
once we exit the scope of this function.
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/35068?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I89eb519b22d21011d61a7855b2364bc3c295df82
Gerrit-Change-Number: 35068
Gerrit-PatchSet: 10
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 23 Feb 2024 13:55:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment