citra-emu
/
citra-canary
Archived
1
0
Fork 0

nwm_uds: Change ASSERT to LOG_ERROR

This might be caused by some packet/status delay within the enet protocol, or may be caused by our not properly handling disconnection. Anyway, this situation *can* happen, and we should not crash Citra for a non-critical error.
This commit is contained in:
zhupengfei 2020-06-04 23:06:10 +08:00
parent 9965ce6938
commit b34ceb89c5
No known key found for this signature in database
GPG Key ID: DD129E108BD09378
1 changed files with 5 additions and 3 deletions

View File

@ -344,9 +344,11 @@ void NWM_UDS::HandleSecureDataPacket(const Network::WifiPacket& packet) {
// The packet wasn't addressed to us, we can only act as a router if we're the host. // The packet wasn't addressed to us, we can only act as a router if we're the host.
// However, we might have received this packet due to a broadcast from the host, in that // However, we might have received this packet due to a broadcast from the host, in that
// case just ignore it. // case just ignore it.
ASSERT_MSG(packet.destination_address == Network::BroadcastMac || if (packet.destination_address != Network::BroadcastMac &&
connection_status.status == static_cast<u32>(NetworkStatus::ConnectedAsHost), connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
"Can't be a router if we're not a host"); LOG_ERROR(Service_NWM, "Received packet addressed to others but we're not a host");
return;
}
if (connection_status.status == static_cast<u32>(NetworkStatus::ConnectedAsHost) && if (connection_status.status == static_cast<u32>(NetworkStatus::ConnectedAsHost) &&
secure_data.dest_node_id != BroadcastNetworkNodeId) { secure_data.dest_node_id != BroadcastNetworkNodeId) {