Rewritten hostname extraction from resolver URL#164
Merged
aarond10 merged 1 commit intoaarond10:masterfrom Nov 19, 2023
Merged
Conversation
Contributor
Author
|
Nope, do not merge it yet 😅 |
Contributor
Author
|
Now it is fixed, should be working properly. |
aarond10
approved these changes
Nov 19, 2023
| uri = tmp; | ||
| static int is_ipv4_address(char *str) { | ||
| struct in6_addr addr; | ||
| return inet_pton(AF_INET, str, &addr) == 1; |
Contributor
Author
There was a problem hiding this comment.
I hoped so. You are welcome!
| return inet_pton(AF_INET, str, &addr) == 1; | ||
| } | ||
|
|
||
| static int hostname_from_url(const char* url_in, |
Owner
There was a problem hiding this comment.
Nit: May be worth keeping the return code comment (non-zero == success, zero = failure).
Contributor
Author
There was a problem hiding this comment.
Actually I have left a very minimal trace of that comment by indicating which value means success. I thought it is enough.
res = 1; // success
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, this change fixes #160
Beside that I would recommend to close all the current issues. I think all of them are answered or we have nothing to do with them.