Skip to content

fix parsing join host#3103

Merged
mercury233 merged 1 commit into
Fluorohydride:masterfrom
mercury233:patch-2
Jun 2, 2026
Merged

fix parsing join host#3103
mercury233 merged 1 commit into
Fluorohydride:masterfrom
mercury233:patch-2

Conversation

@mercury233

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the LAN “Join Host” flow to improve how the host input is parsed/resolved when connecting as a client.

Changes:

  • Refactors join host/port parsing to use separate hoststr/portstr buffers and UTF-8 encoding into hostname/port.
  • Attempts direct IPv4 parsing first, then falls back to DNS resolution via evutil_getaddrinfo when needed.
  • Persists the last-joined host from the host input buffer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gframe/menu_handler.cpp
BufferIO::EncodeUTF8(portstr, port);
unsigned int remote_addr = htonl(inet_addr(hostname));
if(remote_addr == INADDR_NONE) {
evutil_addrinfo hints{};

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i guess not necessary

@mercury233 mercury233 merged commit 158912c into Fluorohydride:master Jun 2, 2026
15 checks passed
@mercury233 mercury233 deleted the patch-2 branch June 2, 2026 01:13
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