diff --git a/src/core/hle/service/nwm/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp index 025a71e9a..189bf57f9 100644 --- a/src/core/hle/service/nwm/nwm_uds.cpp +++ b/src/core/hle/service/nwm/nwm_uds.cpp @@ -1165,9 +1165,9 @@ void NWM_UDS::GetChannel(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_NWM, "called"); } -void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx, const u8* network_info_buffer, - std::size_t network_info_size, u8 connection_type, - std::vector passphrase) { +void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx, u16 command_id, + const u8* network_info_buffer, std::size_t network_info_size, + u8 connection_type, std::vector passphrase) { network_info = {}; std::memcpy(&network_info, network_info_buffer, network_info_size); @@ -1181,10 +1181,10 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx, const u8* network connection_event = ctx.SleepClientThread( system.Kernel().GetThreadManager().GetCurrentThread(), "uds::ConnectToNetwork", UDSConnectionTimeout, - [](Kernel::SharedPtr thread, Kernel::HLERequestContext& ctx, - Kernel::ThreadWakeupReason reason) { + [command_id](Kernel::SharedPtr thread, Kernel::HLERequestContext& ctx, + Kernel::ThreadWakeupReason reason) { // TODO(B3N30): Add error handling for host full and timeout - IPC::RequestBuilder rb(ctx, 0x1E, 1, 0); + IPC::RequestBuilder rb(ctx, command_id, 1, 0); rb.Push(RESULT_SUCCESS); LOG_DEBUG(Service_NWM, "connection sequence finished"); }); @@ -1201,8 +1201,8 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx) { std::vector passphrase = rp.PopStaticBuffer(); - ConnectToNetwork(ctx, network_info_buffer.data(), network_info_buffer.size(), connection_type, - std::move(passphrase)); + ConnectToNetwork(ctx, 0x1E, network_info_buffer.data(), network_info_buffer.size(), + connection_type, std::move(passphrase)); LOG_DEBUG(Service_NWM, "called"); } @@ -1219,8 +1219,8 @@ void NWM_UDS::ConnectToNetworkDeprecated(Kernel::HLERequestContext& ctx) { std::vector passphrase = rp.PopStaticBuffer(); - ConnectToNetwork(ctx, network_info_buffer.data(), network_info_buffer.size(), connection_type, - std::move(passphrase)); + ConnectToNetwork(ctx, 0x11, network_info_buffer.data(), network_info_buffer.size(), + connection_type, std::move(passphrase)); LOG_DEBUG(Service_NWM, "called"); } diff --git a/src/core/hle/service/nwm/nwm_uds.h b/src/core/hle/service/nwm/nwm_uds.h index 82d0833d1..b28b578a7 100644 --- a/src/core/hle/service/nwm/nwm_uds.h +++ b/src/core/hle/service/nwm/nwm_uds.h @@ -423,9 +423,9 @@ private: ResultCode BeginHostingNetwork(const u8* network_info_buffer, std::size_t network_info_size, std::vector passphrase); - void ConnectToNetwork(Kernel::HLERequestContext& ctx, const u8* network_info_buffer, - std::size_t network_info_size, u8 connection_type, - std::vector passphrase); + void ConnectToNetwork(Kernel::HLERequestContext& ctx, u16 command_id, + const u8* network_info_buffer, std::size_t network_info_size, + u8 connection_type, std::vector passphrase); void BeaconBroadcastCallback(u64 userdata, s64 cycles_late);