From 1f07ab86437c613242672c20d93a571e3f6b25f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= <112760654+DaniElectra@users.noreply.github.com> Date: Tue, 8 Aug 2023 22:00:42 +0100 Subject: [PATCH] http/ac: Fix failing assert and stub GetConnectingProxyEnable (#6864) --- src/core/hle/service/ac/ac.cpp | 11 +++++++++++ src/core/hle/service/ac/ac.h | 8 ++++++++ src/core/hle/service/ac/ac_i.cpp | 1 + src/core/hle/service/ac/ac_u.cpp | 1 + src/core/hle/service/http/http_c.cpp | 1 + 5 files changed, 22 insertions(+) diff --git a/src/core/hle/service/ac/ac.cpp b/src/core/hle/service/ac/ac.cpp index c1a61126bf..84c989642b 100644 --- a/src/core/hle/service/ac/ac.cpp +++ b/src/core/hle/service/ac/ac.cpp @@ -151,6 +151,17 @@ void Module::Interface::RegisterDisconnectEvent(Kernel::HLERequestContext& ctx) LOG_WARNING(Service_AC, "(STUBBED) called"); } +void Module::Interface::GetConnectingProxyEnable(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp(ctx); + constexpr bool proxy_enabled = false; + + IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); + rb.Push(RESULT_SUCCESS); + rb.Push(proxy_enabled); + + LOG_WARNING(Service_AC, "(STUBBED) called"); +} + void Module::Interface::IsConnected(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx); u32 unk = rp.Pop(); diff --git a/src/core/hle/service/ac/ac.h b/src/core/hle/service/ac/ac.h index 4203b0a934..38761150b9 100644 --- a/src/core/hle/service/ac/ac.h +++ b/src/core/hle/service/ac/ac.h @@ -120,6 +120,14 @@ public: */ void RegisterDisconnectEvent(Kernel::HLERequestContext& ctx); + /** + * AC::GetConnectingProxyEnable service function + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + * 2 : bool, is proxy enabled + */ + void GetConnectingProxyEnable(Kernel::HLERequestContext& ctx); + /** * AC::IsConnected service function * Outputs: diff --git a/src/core/hle/service/ac/ac_i.cpp b/src/core/hle/service/ac/ac_i.cpp index 84a643e8bc..f7766b3249 100644 --- a/src/core/hle/service/ac/ac_i.cpp +++ b/src/core/hle/service/ac/ac_i.cpp @@ -27,6 +27,7 @@ AC_I::AC_I(std::shared_ptr ac) : Module::Interface(std::move(ac), "ac:i" {0x0027, &AC_I::GetInfraPriority, "GetInfraPriority"}, {0x002D, &AC_I::SetRequestEulaVersion, "SetRequestEulaVersion"}, {0x0030, &AC_I::RegisterDisconnectEvent, "RegisterDisconnectEvent"}, + {0x0036, &AC_I::GetConnectingProxyEnable, "GetConnectingProxyEnable"}, {0x003C, nullptr, "GetAPSSIDList"}, {0x003E, &AC_I::IsConnected, "IsConnected"}, {0x0040, &AC_I::SetClientVersion, "SetClientVersion"}, diff --git a/src/core/hle/service/ac/ac_u.cpp b/src/core/hle/service/ac/ac_u.cpp index d6d0a68679..12506962c5 100644 --- a/src/core/hle/service/ac/ac_u.cpp +++ b/src/core/hle/service/ac/ac_u.cpp @@ -27,6 +27,7 @@ AC_U::AC_U(std::shared_ptr ac) : Module::Interface(std::move(ac), "ac:u" {0x0027, &AC_U::GetInfraPriority, "GetInfraPriority"}, {0x002D, &AC_U::SetRequestEulaVersion, "SetRequestEulaVersion"}, {0x0030, &AC_U::RegisterDisconnectEvent, "RegisterDisconnectEvent"}, + {0x0036, &AC_U::GetConnectingProxyEnable, "GetConnectingProxyEnable"}, {0x003C, nullptr, "GetAPSSIDList"}, {0x003E, &AC_U::IsConnected, "IsConnected"}, {0x0040, &AC_U::SetClientVersion, "SetClientVersion"}, diff --git a/src/core/hle/service/http/http_c.cpp b/src/core/hle/service/http/http_c.cpp index 30f16db9f8..fb6b6d07c9 100644 --- a/src/core/hle/service/http/http_c.cpp +++ b/src/core/hle/service/http/http_c.cpp @@ -267,6 +267,7 @@ void HTTP_C::ReceiveDataImpl(Kernel::HLERequestContext& ctx, bool timeout) { } else { LOG_WARNING(Service_HTTP, "(STUBBED) called"); } + [[maybe_unused]] Kernel::MappedBuffer& buffer = rp.PopMappedBuffer(); if (!PerformStateChecks(ctx, rp, context_handle)) { return;