From d5d0301702086cc9f02e30888b94a3c2029fcd27 Mon Sep 17 00:00:00 2001 From: PTRCoder Date: Fri, 23 Aug 2024 19:36:55 +0200 Subject: [PATCH] Added temp logging for debugging --- src/core/hle/service/ac/ac.cpp | 11 +++++++---- src/core/hle/service/nwm/nwm_inf.cpp | 8 ++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/ac/ac.cpp b/src/core/hle/service/ac/ac.cpp index 8a067b71d..9125e8c3b 100644 --- a/src/core/hle/service/ac/ac.cpp +++ b/src/core/hle/service/ac/ac.cpp @@ -228,10 +228,13 @@ void Module::Interface::ScanAPs(Kernel::HLERequestContext& ctx) { ctx.Session(), thread); context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process); - auto nwm_inf = - Core::System::GetInstance().ServiceManager().GetService("nwm::INF"); - nwm_inf->HandleSyncRequest(*context); + LOG_WARNING(Service_AC, "Finished setting up context"); + auto nwm_inf = + Core::System::GetInstance().ServiceManager().GetService("nwm::INF"); + LOG_WARNING(Service_AC, "Calling NWM_INF::RecvBeaconBroadcastData"); + nwm_inf->HandleSyncRequest(*context); + LOG_WARNING(Service_AC, "Returned to AC::ScanAPs"); // Response should be // 0: Header Code (ignored) // 1: Result Code (Success/Unknown/etc.) @@ -242,7 +245,7 @@ void Module::Interface::ScanAPs(Kernel::HLERequestContext& ctx) { Kernel::MappedBuffer mapped_buffer = rp2.PopMappedBuffer(); mapped_buffer.Read(buffer.data(), 0, buffer.size()); rb.PushStaticBuffer(buffer, 0); - LOG_WARNING(Service_AC, "(STUBBED) called"); + LOG_WARNING(Service_AC, "(STUBBED) called, pid={}, unknown={}", pid, unknown); } void Module::Interface::GetInfraPriority(Kernel::HLERequestContext& ctx) { diff --git a/src/core/hle/service/nwm/nwm_inf.cpp b/src/core/hle/service/nwm/nwm_inf.cpp index 6a33cd06a..970fd1afa 100644 --- a/src/core/hle/service/nwm/nwm_inf.cpp +++ b/src/core/hle/service/nwm/nwm_inf.cpp @@ -4,6 +4,7 @@ #include #include "common/archives.h" +#include "common/logging/log.h" #include "core/core.h" #include "core/hle/ipc.h" #include "core/hle/ipc_helpers.h" @@ -18,6 +19,8 @@ void NWM_INF::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx); // TODO(PTR) Update implementation to cover differences between NWM_INF and NWM_UDS + LOG_WARNING(Service_NWM, "Started NWM_INF::RecvBeaconBroadcastData"); + // adding in extra context value for transition from INF to UDS std::array cmd_buf; int i; @@ -37,9 +40,13 @@ void NWM_INF::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) { std::make_shared(Core::System::GetInstance().Kernel(), ctx.Session(), thread); context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process); + LOG_WARNING(Service_NWM, "Finished converting context"); auto nwm_uds = Core::System::GetInstance().ServiceManager().GetService("nwm::UDS"); + + LOG_WARNING(Service_NWM, "Calling NWM_UDS::RecvBeaconBroadcastData"); nwm_uds->HandleSyncRequest(*context); + LOG_WARNING(Service_NWM, "Returned to NWM_INF::RecvBeaconBroadcastData"); IPC::RequestParser rp2(*context); @@ -47,6 +54,7 @@ void NWM_INF::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) { rb.Push(rp2.Pop()); rb.PushMappedBuffer(rp2.PopMappedBuffer()); + LOG_WARNING(Service_NWM, "Finished NWM_INF::RecvBeaconBroadcastData"); } NWM_INF::NWM_INF() : ServiceFramework("nwm::INF") {