mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-23 01:56:08 -04:00
fix(multiplayer): Z-A Connection Issues
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -852,6 +852,11 @@ Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, std::span<const u8
|
|||||||
}
|
}
|
||||||
auto value = GetValue<u32>(optval);
|
auto value = GetValue<u32>(optval);
|
||||||
|
|
||||||
|
if (static_cast<u32>(optname) == 0x200 || optname == OptName::BROADCAST) {
|
||||||
|
socket->SetBroadcast(value != 0);
|
||||||
|
return Errno::SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
switch (optname) {
|
switch (optname) {
|
||||||
case OptName::REUSEADDR:
|
case OptName::REUSEADDR:
|
||||||
if (value != 0 && value != 1) {
|
if (value != 0 && value != 1) {
|
||||||
@@ -865,12 +870,6 @@ Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, std::span<const u8
|
|||||||
return Errno::INVAL;
|
return Errno::INVAL;
|
||||||
}
|
}
|
||||||
return Translate(socket->SetKeepAlive(value != 0));
|
return Translate(socket->SetKeepAlive(value != 0));
|
||||||
case OptName::BROADCAST:
|
|
||||||
if (value != 0 && value != 1) {
|
|
||||||
LOG_WARNING(Service, "Invalid BROADCAST value: {}", value);
|
|
||||||
return Errno::INVAL;
|
|
||||||
}
|
|
||||||
return Translate(socket->SetBroadcast(value != 0));
|
|
||||||
case OptName::SNDBUF:
|
case OptName::SNDBUF:
|
||||||
return Translate(socket->SetSndBuf(value));
|
return Translate(socket->SetSndBuf(value));
|
||||||
case OptName::RCVBUF:
|
case OptName::RCVBUF:
|
||||||
|
|||||||
Reference in New Issue
Block a user