Attention is currently required from: arehbein, daniel, laforge. pespin 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: (1 comment) Patchset: PS4: It can know based on the OSMO_IO_FD_MODE configured during osmo_iofd_setup(). So before using one callback, the implementation needs to check ofc also the io mode is the one used. It doesn't make sense for a user of the API to set one io_mode and then set callbacks for the other mode, this is a bug in the user, wrong use of the API.
it's possible to create an osmo_io_fd using osmo_iofd_setup in one mode (e.g. OSMO_IO_FD_MODE_READ_WRITE) but the register an osmo_io_ops with wrong call-backs (e.g. recvfrom/sendto).
IMHO that's a bug / wrong use of the API at the user and nothing to be fixed in the osmo_io implementation. -- 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@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: arehbein <arehbein@sysmocom.de> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Attention: daniel <dwillmann@sysmocom.de> Gerrit-Comment-Date: Thu, 30 Nov 2023 14:51:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de> Comment-In-Reply-To: daniel <dwillmann@sysmocom.de> Gerrit-MessageType: comment