summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLotP1 <68976644+LotP1@users.noreply.github.com>2024-01-30 00:23:43 +0100
committerGitHub <noreply@github.com>2024-01-30 00:23:43 +0100
commit3acf35bb985ec40a8498c3e6903ec16f755a9b2e (patch)
tree8e81fde617da88bee9377680eb123adb0c1f8f8f /src
parent8ddfecfbaea7b08e300350fd2f14fb6b2e79634b (diff)
Update sockets_translate.cpp
Add support for the CONNREFUSED Errno. Without this Connect() will return SUCCESS when a connection is refused, instead of an error code. This causes code, that relies on the result of Connect() being SUCCESS, to execute when it shouldn't.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/sockets/sockets_translate.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/service/sockets/sockets_translate.cpp b/src/core/hle/service/sockets/sockets_translate.cpp
index aed05250c..ea0b081c2 100644
--- a/src/core/hle/service/sockets/sockets_translate.cpp
+++ b/src/core/hle/service/sockets/sockets_translate.cpp
@@ -15,6 +15,8 @@ Errno Translate(Network::Errno value) {
switch (value) {
case Network::Errno::SUCCESS:
return Errno::SUCCESS;
+ case Network::Errno::CONNREFUSED:
+ return Errno::CONNREFUSED;
case Network::Errno::BADF:
return Errno::BADF;
case Network::Errno::AGAIN: