Attention is currently required from: pespin.
falconia has posted comments on this change by falconia. (
https://gerrit.osmocom.org/c/libosmo-netif/+/39281?usp=email )
Change subject: bring twrtp into libosmo-netif
......................................................................
Patch Set 8:
(6 comments)
File src/twrtp.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/39281/comment/b6625a30_2a2001e… :
PS7, Line 304: close(rtcp_fd);
if (rtcp_fd >= 0) […]
Done
https://gerrit.osmocom.org/c/libosmo-netif/+/39281/comment/c5d8eece_357c21c… :
PS7, Line 313: close(rtcp_fd);
if (rtcp_fd >= 0) […]
Done
https://gerrit.osmocom.org/c/libosmo-netif/+/39281/comment/3f9e3284_c90264e… :
PS7, Line 322: close(rtcp_fd);
if (rtcp_fd >= 0) […]
Done
https://gerrit.osmocom.org/c/libosmo-netif/+/39281/comment/be05444d_e1e04eb… :
PS7, Line 333: close(rtcp_fd);
if (rtcp_fd >= 0) […]
Done
https://gerrit.osmocom.org/c/libosmo-netif/+/39281/comment/81a36416_e34f9d7… :
PS7, Line 343: close(rtcp_fd);
if (rtcp_fd >= 0) […]
Done
https://gerrit.osmocom.org/c/libosmo-netif/+/39281/comment/160f7029_f98c7c3… :
PS7, Line 348: return 0;
You could add return goto tags here for failing cases
to make closing/freeing more organized and cle […]
I am not smart enough to find a
way to do it cleanly. In some error exit paths we need to explicitly close the passed fd,
yet in others the closing is done by `osmo_iofd_free()`. Doing an extra `close()` after
`osmo_iofd_free()` could create a race condition in multi-threaded applications: what if
some other thread opens a new file or socket etc and gets the same fd.
Can you accept Patchset 8 as it stands?
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/39281?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib63215aaf13ef8ab8f2e0c8d310164cd5c8824eb
Gerrit-Change-Number: 39281
Gerrit-PatchSet: 8
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 01 Sep 2025 16:37:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>