diff options
author | Subv <subv2112@gmail.com> | 2017-06-14 04:50:22 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-06-15 19:08:54 +0200 |
commit | 61ce89a55ac6ff12f881e3bba0220ac3f04fbf50 (patch) | |
tree | 94f6a763cbc68198317556551ae31fe43a1cc44f /src/core/hle/service | |
parent | UDS: Stub SendTo to generate the unencrypted data frame with the right headers. (diff) | |
download | yuzu-61ce89a55ac6ff12f881e3bba0220ac3f04fbf50.tar yuzu-61ce89a55ac6ff12f881e3bba0220ac3f04fbf50.tar.gz yuzu-61ce89a55ac6ff12f881e3bba0220ac3f04fbf50.tar.bz2 yuzu-61ce89a55ac6ff12f881e3bba0220ac3f04fbf50.tar.lz yuzu-61ce89a55ac6ff12f881e3bba0220ac3f04fbf50.tar.xz yuzu-61ce89a55ac6ff12f881e3bba0220ac3f04fbf50.tar.zst yuzu-61ce89a55ac6ff12f881e3bba0220ac3f04fbf50.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/nwm/nwm_uds.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/core/hle/service/nwm/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp index f6125825f..c43c5ca44 100644 --- a/src/core/hle/service/nwm/nwm_uds.cpp +++ b/src/core/hle/service/nwm/nwm_uds.cpp @@ -404,15 +404,22 @@ static void SendTo(Interface* self) { const VAddr input_address = rp.PopStaticBuffer(&desc_size, false); ASSERT(desc_size == data_size); - // TODO(Subv): Figure out the error if this is called while not connected to a network. - if (connection_status.status == static_cast<u32>(NetworkStatus::ConnectedAsClient) || - connection_status.status == static_cast<u32>(NetworkStatus::ConnectedAsHost)) { - ASSERT_MSG(false, "Not connected to a network (unimplemented)"); + IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); + + if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsClient) && + connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) { + rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::UDS, + ErrorSummary::InvalidState, ErrorLevel::Status)); + return; } - // TODO(Subv): Do something with the flags. + if (dest_node_id == connection_status.network_node_id) { + rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::UDS, + ErrorSummary::WrongArgument, ErrorLevel::Status)); + return; + } - IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); + // TODO(Subv): Do something with the flags. constexpr size_t MaxSize = 0x5C6; if (data_size > MaxSize) { |