yuzu-emu
/
yuzu
Archived
1
0
Fork 0

net: translate ECONNRESET network error

This commit is contained in:
MonsterDruide1 2023-02-21 20:43:31 +01:00
parent 89221ca7d5
commit d746cfc018
4 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,7 @@ enum class Errno : u32 {
INVAL = 22, INVAL = 22,
MFILE = 24, MFILE = 24,
MSGSIZE = 90, MSGSIZE = 90,
CONNRESET = 104,
NOTCONN = 107, NOTCONN = 107,
TIMEDOUT = 110, TIMEDOUT = 110,
}; };

View File

@ -27,6 +27,8 @@ Errno Translate(Network::Errno value) {
return Errno::NOTCONN; return Errno::NOTCONN;
case Network::Errno::TIMEDOUT: case Network::Errno::TIMEDOUT:
return Errno::TIMEDOUT; return Errno::TIMEDOUT;
case Network::Errno::CONNRESET:
return Errno::CONNRESET;
default: default:
UNIMPLEMENTED_MSG("Unimplemented errno={}", value); UNIMPLEMENTED_MSG("Unimplemented errno={}", value);
return Errno::SUCCESS; return Errno::SUCCESS;

View File

@ -109,6 +109,8 @@ Errno TranslateNativeError(int e) {
return Errno::AGAIN; return Errno::AGAIN;
case WSAECONNREFUSED: case WSAECONNREFUSED:
return Errno::CONNREFUSED; return Errno::CONNREFUSED;
case WSAECONNRESET:
return Errno::CONNRESET;
case WSAEHOSTUNREACH: case WSAEHOSTUNREACH:
return Errno::HOSTUNREACH; return Errno::HOSTUNREACH;
case WSAENETDOWN: case WSAENETDOWN:
@ -205,6 +207,8 @@ Errno TranslateNativeError(int e) {
return Errno::AGAIN; return Errno::AGAIN;
case ECONNREFUSED: case ECONNREFUSED:
return Errno::CONNREFUSED; return Errno::CONNREFUSED;
case ECONNRESET:
return Errno::CONNRESET;
case EHOSTUNREACH: case EHOSTUNREACH:
return Errno::HOSTUNREACH; return Errno::HOSTUNREACH;
case ENETDOWN: case ENETDOWN:

View File

@ -30,6 +30,7 @@ enum class Errno {
NOTCONN, NOTCONN,
AGAIN, AGAIN,
CONNREFUSED, CONNREFUSED,
CONNRESET,
HOSTUNREACH, HOSTUNREACH,
NETDOWN, NETDOWN,
NETUNREACH, NETUNREACH,