Attention is currently required from: osmith, laforge, fixeria.
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmo-sccp/+/34089 )
Change subject: ss7: Use libosmo-netif's osmo_stream_{cli,srv}_recv() APIs
......................................................................
Patch Set 1:
(2 comments)
File src/osmo_ss7.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/34089/comment/615ea90e_ef7bdc8a
PS1, Line 1951: rc = 0;
What if rc == -EAGAIN, do you want it to be set to 0?
(probably, but just to be sure)
Yes, this is fine, we just clear any error code
(like -EBADF) which may trigger stuff in the callback caller. It's totally fine
returning 0 instead of EAGAIN here, since we already did whatever we had to do (and the
READ flag is still set so poll will trigger again if the kernel finds out the socket has
somethig else for us).
https://gerrit.osmocom.org/c/libosmo-sccp/+/34089/comment/76ce9aee_f6c97fe0
PS1, Line 1954: if (rc < 0) {
why not if (rc <= 0) {? […]
I prefer keeping
the 2 scenarios separate, even if we end up doing the same right now. In the future we may
want to check for specific errors in this path.
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/34089
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If3d78b636e8e224aa9c8597d0b242e29d3e3c84e
Gerrit-Change-Number: 34089
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 21 Aug 2023 09:50:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment