Attention is currently required from: arehbein, laforge, neels, pespin.
2 comments:
File src/core/osmo_io.c:
Patch Set #3, Line 546: if (iofd->io_ops.read_cb)
ah ok, read_cb happens to be in the same place as recvfrom_cb, so only checking the one location wor […]
This fix is only necessary after removing the union. I don't see how you could realize checking the exact member with the union in place. I can basically stick an
```c
OSMO_ASSERT(&iofd->io_ops.read_cb == &iofd->io_ops.recvfrom_cb)
```
in here. Unless I'm missing something this is exactly the feature of the union, afterwards you can't know whether this memory location was set as read_cb or recvfrom_cb.
File src/core/osmo_io.c:
Patch Set #4, Line 391: || (iofd->mode == OSMO_IO_FD_MODE_RECVFROM_SENDTO && iofd->io_ops.recvfrom_cb));
this code should also work with the union present?
It "works" in the sense that it even returns true if mode == *_READ_WRITE and .recvfrom_cb (or the other way around) is set since both function pointers are sharing the same memory location.
To view, visit change 35079. To unsubscribe, or for help writing mail filters, visit settings.