From 3acf35bb985ec40a8498c3e6903ec16f755a9b2e Mon Sep 17 00:00:00 2001 From: LotP1 <68976644+LotP1@users.noreply.github.com> Date: Tue, 30 Jan 2024 00:23:43 +0100 Subject: 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. --- src/core/hle/service/sockets/sockets_translate.cpp | 2 ++ 1 file changed, 2 insertions(+) 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: -- cgit v1.2.3