aboutsummaryrefslogtreecommitdiff
path: root/src/common/logging.cpp
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-11-03 00:17:50 +0100
committercirakg <cirakg@cirakg.xyz>2026-11-03 00:17:50 +0100
commitfd3e2fe18a101e2bbfd5935263183e25ab26497b (patch)
treef15e5f5ebb59b0d5cfd72a50346355e607c31ddd /src/common/logging.cpp
parenta931609f31672f782d2817f5764d65c00dea4dad (diff)
network: fix room socket races and share the room network check
bsd:s, bsd:u and bsd:a share one file descriptor table, but each service bound its own proxy packet callback, so every room packet was queued three times on each socket. Bind the callback once. The room thread walked the descriptor table without a lock while bsd created and closed sockets, so it could reach a destroyed or not yet created socket. Guard the table with a mutex, and publish a socket only after it is created and initialized. Check airplane mode before an fd is taken, so a refused socket no longer leaks its slot. ProxySocket now initializes protocol, decompresses packets outside the packet lock without copying the compressed data first, and keeps a read offset for partial TCP reads instead of erasing from the front. Add Network::GetRoomIPv4Address(), set only in the Joined and Moderator states. NIFM uses it for network availability and for every reported address, including EnumerateNetworkInterfaces and GetCurrentIpAddress, so no call reports the room address while another rejects the network. Assisted-by: Claude Opus 5.5 (investigation and implementation)
Diffstat (limited to 'src/common/logging.cpp')
0 files changed, 0 insertions, 0 deletions