Skip to content

frameworks/base: ignore invalid handle in android_getaddrinfofornetwork#79

Open
NotKit wants to merge 1 commit into
halium-11.0from
halium-11.0-android_getaddrinfofornetwork
Open

frameworks/base: ignore invalid handle in android_getaddrinfofornetwork#79
NotKit wants to merge 1 commit into
halium-11.0from
halium-11.0-android_getaddrinfofornetwork

Conversation

@NotKit
Copy link
Copy Markdown
Collaborator

@NotKit NotKit commented Apr 19, 2024

Since we fallback to host systemd-resolved in bionic, specifying network ID doesn't make sense anyway and we can use NETID_UNSET.

Since we fallback to host systemd-resolved in bionic, specifying
network ID doesn't make sense anyway and we can use NETID_UNSET.
Copy link
Copy Markdown

@ElectrodeYT ElectrodeYT left a comment

Choose a reason for hiding this comment

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

LGTM; although I do still wonder if simply replacing the entire function with something along the lines of return android_getaddrinfofornet(node, service, hints, NETID_UNSET, MARK_UNSET, res); would work as well? I don't know if this function will ever see a valid net handle, which would make the check needless

Would technically save a needless if statement, but I doubt that this gets called enough for that branch to be even close to wasting performance lol

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