Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make getnameinfo simpler #196

Merged
merged 1 commit into from
Jun 22, 2021
Merged

make getnameinfo simpler #196

merged 1 commit into from
Jun 22, 2021

Conversation

ahgamut
Copy link
Collaborator

@ahgamut ahgamut commented Jun 21, 2021

The getnameinfo implementation requires an address -> name lookup on the
hosts file (ie struct HostsTxt) and the previous implementation used
flags to check whether HostsTxt was sorted according to address or name,
and then re-sorted it if necessary. Now getnameinfo lookup does not
require sorting, it does a simple linear lookup. The sorting function for HostsTxt
and the related tests) are reverted to what they were in f721d61.

See #172 for discussion.

The getnameinfo implementation requires an address -> name lookup on the
hosts file (ie struct HostsTxt) and the previous implementation used
flags to check whether HostsTxt was sorted according to address or name,
and then re-sorted it if necessary. Now getnameinfo lookup does not
require sorting, it does a simple linear lookup, and so the related code
was simplified

See jart#172 for discussion.
Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jart jart merged commit 98c53ae into jart:master Jun 22, 2021
@ahgamut ahgamut deleted the simple-nameinfo branch June 23, 2021 08:33
@ahgamut ahgamut mentioned this pull request Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants