neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/15961 )

Change subject: add osmo_sockaddr_str_cmp() and _str_ip_cmp()
......................................................................


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/15961/4/src/sockaddr_str.c
File src/sockaddr_str.c:

https://gerrit.osmocom.org/c/libosmocore/+/15961/4/src/sockaddr_str.c@104
PS4, Line 104: int osmo_sockaddr_str_cmp(const struct osmo_sockaddr_str *a, 
const struct osmo_sockaddr_str *b)
> It's not clear to me why do you want to have this one as a public API having 
> the other. […]
This patch first had only this one, and later I figured it would be very useful 
to also compare by actual resulting IP address.

I figured, to sort a list of addresses by the string representation chosen by 
the user, then this cmp() would be more desirable, so I was just going to keep 
this.

indeed I don't currently have a caller for it...

I'm slightly reluctant, but fair enough then. In that case I'll just have one 
osmo_sockaddr_str_cmp() that compares resulting IP addresses and keep the pure 
string variant static. If we need it later it can be called 
osmo_sockaddr_str_cmp_by_string() or something.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501
Gerrit-Change-Number: 15961
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-CC: pespin <pes...@sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Nov 2019 18:43:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pes...@sysmocom.de>
Gerrit-MessageType: comment

Reply via email to