Attention is currently required from: arehbein, daniel, laforge, pespin.
neels has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/35079?usp=email )
Change subject: osmo_io: Remove union in struct osmo_io_ops
......................................................................
Patch Set 4:
(3 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/35079/comment/4642b068_2e53601d
PS4, Line 11: from distinguishing between write_cb() and sendto_cb() etc.
AFAIU, iofd->mode should distinguish which union members are in use, so it should be
possible to handle things properly .. where exactly is the bug this is fixing? is the mode
switched without NULLing the cb pointers or something in that way?
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/35079/comment/504ea742_ce7737fb
PS3, Line 546: if (iofd->io_ops.read_cb)
The fact that this happened to work is even more
reason to remove the union.
i fail to see the problem though, can you explain?
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/35079/comment/2d9f5f19_5048d303
PS4, Line 391: || (iofd->mode == OSMO_IO_FD_MODE_RECVFROM_SENDTO &&
iofd->io_ops.recvfrom_cb));
this code should also work with the union present?
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/35079?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: I138d57843edc29000530bb7896bcb239002ecbec
Gerrit-Change-Number: 35079
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 01 Dec 2023 02:04:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment