Change in libosmocore[master]: add osmo_sockaddr_str_cmp() and _str_ip_cmp()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Mon Nov 11 18:43:05 UTC 2019


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 <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-CC: pespin <pespin at 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 <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191111/8475eced/attachment.htm>


More information about the gerrit-log mailing list