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?