mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-25 02:49:45 -04:00
fix: socket assertion crashes and add Nex service stub
- Replace socket option assertion failures with proper error returns - Add WSAENOPROTOOPT/ENOPROTOOPT error handling - Fix LINGER and option value size validation - Add Network::Errno::OTHER translation - Implement basic Nex service stub for error code 2306-0520 Fixes crashes in Minecraft and other games when encountering unsupported socket operations or attempting to use Nintendo's online services. Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -158,6 +158,8 @@ Errno TranslateNativeError(int e, CallType call_type = CallType::Other) {
|
||||
return Errno::TIMEDOUT;
|
||||
case WSAEINPROGRESS:
|
||||
return Errno::INPROGRESS;
|
||||
case WSAENOPROTOOPT:
|
||||
return Errno::INVAL;
|
||||
default:
|
||||
UNIMPLEMENTED_MSG("Unimplemented errno={}", e);
|
||||
return Errno::OTHER;
|
||||
@@ -297,6 +299,8 @@ Errno TranslateNativeError(int e, CallType call_type = CallType::Other) {
|
||||
return Errno::TIMEDOUT;
|
||||
case EINPROGRESS:
|
||||
return Errno::INPROGRESS;
|
||||
case ENOPROTOOPT:
|
||||
return Errno::INVAL;
|
||||
default:
|
||||
UNIMPLEMENTED_MSG("Unimplemented errno={} ({})", e, strerror(e));
|
||||
return Errno::OTHER;
|
||||
|
||||
Reference in New Issue
Block a user