pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31804 ) Change subject: logging: Unregister osmo_fd before closing fd ...................................................................... Patch Set 3: (1 comment) Patchset: PS3:
@pespin: can you explain why calling `osmo_fd_unregister()` after `close()` is wrong? AFAIU, because […] The problem is not "closing" the socket per se, but modifying the "fd" field of an osmo_fd which is registered (here setting it to -1). That was already not expected by the implementation of the API before, but it was simply not checked and assumed to be done correctly by the user of te osmo_fd API. Since recently we dediced to enforce this behavior through an assert instead of having unexpected behaviors.
-- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31804 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0754ac3110b63d2a380068010830af6c85b0a653 Gerrit-Change-Number: 31804 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> Gerrit-Comment-Date: Sun, 12 Mar 2023 19:07:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: comment