Attention is currently required from: osmith.
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/35232?usp=email )
Change subject: socket: Reimplement osmo_sock_init2_multiaddr()
......................................................................
Patch Set 2:
(3 comments)
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/35232/comment/9eb46716_ec2e3ae6
PS2, Line 922: IPv4 or IPv6
IPv4-only or IPv6-only
Ack
https://gerrit.osmocom.org/c/libosmocore/+/35232/comment/a8a8901b_f66bfa2a
PS2, Line 933: * Both are checked here through "or" here to account for
"bind flag set,
what do you mean with 'checked through
"or" here', did you mean to write it like this? […]
I'm talking
about OSMO_SOCK_F_BIND or OSMO_SOCK_F_CONNECT flags here.
If for instance OSMO_SOCK_F_BIND is not set, rem_has_v6addr needs checking, and if
OSMO_SOCK_F_CONNECT is not set, loc_has_v6addr needs checking. If both are set, both need
checking.
https://gerrit.osmocom.org/c/libosmocore/+/35232/comment/0e84c9ea_7790b3dc
PS2, Line 945: (loc_has_v4addr != rem_has_v4addr || loc_has_v6addr !=
rem_has_v6addr)) {
with multiple return paths I mean, to potentially make
it more readable
I thought about it, but in the end writing it this way is the
easiest way of writing it, instead of writing lots of cases. I think the comment already
hints it.
My point is that no matter how you write it, it's going to need some thinking when
reading it.
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/35232?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2641fbaca6f477404b094dbc53c0c1a3dd3fd2fd
Gerrit-Change-Number: 35232
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 06 Dec 2023 12:35:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment