Skip to content
Success

Changes

Summary

  1. osmo_iofd_register: fix the case of changing fd (details)
Commit 8972da953da57126c6eff2cc23662d61cb37b712 by falcon
osmo_iofd_register: fix the case of changing fd

Doxygen description for this function states:

  \param[in] fd the system fd number that will be registered.
  If you did not yet specify the file descriptor number during
  osmo_fd_setup(), or if it has changed since then, you can state
  the [new] file descriptor number as argument.
  If you wish to proceed with the previously specified file descriptor
  number, pass -1.

However, the case where a new fd is passed to osmo_iofd_register()
while the structure contains an old (but unregistered) fd was not
handled correctly: the code would proceed with re-registering the old
fd, ignoring the newly passed one.

Fixes: df1ee8568b97dbf6d5268a83d1715a1c1fffb2de
Change-Id: If8b8486ad7934afa203dfe1e996c9217373a017b
The file was modifiedsrc/core/osmo_io.c