Repository navigation
Use the typed net name without Enter; stable network test ports (0.4.2) - #7
Merged
Merged
Conversation
The sessions page applied a typed net name only on Enter. A name typed and followed by HOST, JOIN or leaving the page showed in the field but was not used, and came back as the old name next time. MM2's field edits the menu's own name buffer (NetSelectMenu +0x8c), which hosting and joining read; NetSelectMenu::NetNameCB only logs it. The name is now applied on Enter, before HOST and JOIN, and on leaving the page. Applying it no longer replaces the NetGame: tearing down the old one's port forwarding stalled the menus and cleared the LAN list. NetGame:: setPlayerName gives the next host or join the new name, and the profile is saved only when the name changed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ctest runs each test as a process of its own, several at a time, and the port slot came from the clock's microseconds: two processes could land on the same slot now and then, and the second could not bind its port (NetGameLobby.CopsVsRobbersCarsAreTheSameOnEveryMachine failed that way on the v0.4.1 tag's Clang job, after passing in the PR). Processes running at the same time have distinct ids, handed out in order on Linux, so test::processPortSlot (tests/NetTestPorts.h) gives them distinct slots. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A process in test_netgame.cpp binds its base port, +1 (LAN discovery), +2 and +4, but its slots were 2 apart. Process ids in CI's container come in order, so neighbouring tests got neighbouring slots and one's +2 port was the next one's base: NetGame.LanDiscoveryPasswordAndKick could not listen on both Linux jobs of PR #7. The slots are now 6 ports apart (666 slots in the block), and NetTestPorts.h says a block's spacing must cover a process's ports; the other files use at most their spacing already. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Version 0.4.2. The network protocol is unchanged, so 0.4.1 and 0.4.2 can play together.
NetGame::setPlayerNamesets the name the next host or join uses. Test:NetGame.ANameSetBeforeHostingOrJoiningIsUsed.NetGameLobbyfailed that way once on the v0.4.1 tag's Clang job.Testing: 1052/1052 tests pass. The network tests passed three times at -j16.
🤖 Generated with Claude Code