UDS: Change reply command ID for two versions of ConnectToNetwork
This commit is contained in:
parent
aaa599a849
commit
a986e35795
|
@ -1165,9 +1165,9 @@ void NWM_UDS::GetChannel(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NWM, "called");
|
LOG_DEBUG(Service_NWM, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx, const u8* network_info_buffer,
|
void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx, u16 command_id,
|
||||||
std::size_t network_info_size, u8 connection_type,
|
const u8* network_info_buffer, std::size_t network_info_size,
|
||||||
std::vector<u8> passphrase) {
|
u8 connection_type, std::vector<u8> passphrase) {
|
||||||
network_info = {};
|
network_info = {};
|
||||||
std::memcpy(&network_info, network_info_buffer, network_info_size);
|
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(
|
connection_event = ctx.SleepClientThread(
|
||||||
system.Kernel().GetThreadManager().GetCurrentThread(), "uds::ConnectToNetwork",
|
system.Kernel().GetThreadManager().GetCurrentThread(), "uds::ConnectToNetwork",
|
||||||
UDSConnectionTimeout,
|
UDSConnectionTimeout,
|
||||||
[](Kernel::SharedPtr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx,
|
[command_id](Kernel::SharedPtr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx,
|
||||||
Kernel::ThreadWakeupReason reason) {
|
Kernel::ThreadWakeupReason reason) {
|
||||||
// TODO(B3N30): Add error handling for host full and timeout
|
// 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);
|
rb.Push(RESULT_SUCCESS);
|
||||||
LOG_DEBUG(Service_NWM, "connection sequence finished");
|
LOG_DEBUG(Service_NWM, "connection sequence finished");
|
||||||
});
|
});
|
||||||
|
@ -1201,8 +1201,8 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
std::vector<u8> passphrase = rp.PopStaticBuffer();
|
std::vector<u8> passphrase = rp.PopStaticBuffer();
|
||||||
|
|
||||||
ConnectToNetwork(ctx, network_info_buffer.data(), network_info_buffer.size(), connection_type,
|
ConnectToNetwork(ctx, 0x1E, network_info_buffer.data(), network_info_buffer.size(),
|
||||||
std::move(passphrase));
|
connection_type, std::move(passphrase));
|
||||||
|
|
||||||
LOG_DEBUG(Service_NWM, "called");
|
LOG_DEBUG(Service_NWM, "called");
|
||||||
}
|
}
|
||||||
|
@ -1219,8 +1219,8 @@ void NWM_UDS::ConnectToNetworkDeprecated(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
std::vector<u8> passphrase = rp.PopStaticBuffer();
|
std::vector<u8> passphrase = rp.PopStaticBuffer();
|
||||||
|
|
||||||
ConnectToNetwork(ctx, network_info_buffer.data(), network_info_buffer.size(), connection_type,
|
ConnectToNetwork(ctx, 0x11, network_info_buffer.data(), network_info_buffer.size(),
|
||||||
std::move(passphrase));
|
connection_type, std::move(passphrase));
|
||||||
|
|
||||||
LOG_DEBUG(Service_NWM, "called");
|
LOG_DEBUG(Service_NWM, "called");
|
||||||
}
|
}
|
||||||
|
|
|
@ -423,9 +423,9 @@ private:
|
||||||
ResultCode BeginHostingNetwork(const u8* network_info_buffer, std::size_t network_info_size,
|
ResultCode BeginHostingNetwork(const u8* network_info_buffer, std::size_t network_info_size,
|
||||||
std::vector<u8> passphrase);
|
std::vector<u8> passphrase);
|
||||||
|
|
||||||
void ConnectToNetwork(Kernel::HLERequestContext& ctx, const u8* network_info_buffer,
|
void ConnectToNetwork(Kernel::HLERequestContext& ctx, u16 command_id,
|
||||||
std::size_t network_info_size, u8 connection_type,
|
const u8* network_info_buffer, std::size_t network_info_size,
|
||||||
std::vector<u8> passphrase);
|
u8 connection_type, std::vector<u8> passphrase);
|
||||||
|
|
||||||
void BeaconBroadcastCallback(u64 userdata, s64 cycles_late);
|
void BeaconBroadcastCallback(u64 userdata, s64 cycles_late);
|
||||||
|
|
||||||
|
|
Reference in New Issue