mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 00:40:11 +00:00
Signaling: report status inactive on unknown connection
This commit is contained in:
parent
8cd6b9275a
commit
bcce3acd5f
@ -5300,7 +5300,10 @@ error_code sceNpSignalingGetConnectionStatus(u32 ctx_id, u32 conn_id, vm::ptr<s3
|
||||
const auto si = sigh.get_sig_infos(conn_id);
|
||||
|
||||
if (!si)
|
||||
{
|
||||
*conn_status = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
||||
}
|
||||
|
||||
*conn_status = si->conn_status;
|
||||
|
||||
|
@ -448,21 +448,33 @@ error_code sceNpMatching2SignalingGetConnectionStatus(
|
||||
auto [res, npid] = nph.local_get_npid(roomId, memberId);
|
||||
|
||||
if (res)
|
||||
{
|
||||
*connStatus = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||
return res;
|
||||
}
|
||||
|
||||
if (np::is_same_npid(nph.get_npid(), *npid))
|
||||
{
|
||||
*connStatus = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||
return SCE_NP_SIGNALING_ERROR_OWN_NP_ID;
|
||||
}
|
||||
|
||||
auto& sigh = g_fxo->get<named_thread<signaling_handler>>();
|
||||
|
||||
auto conn_id = sigh.get_conn_id_from_npid(*npid);
|
||||
if (!conn_id)
|
||||
{
|
||||
*connStatus = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
||||
}
|
||||
|
||||
const auto si = sigh.get_sig_infos(*conn_id);
|
||||
|
||||
if (!si)
|
||||
{
|
||||
*connStatus = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
||||
}
|
||||
|
||||
*connStatus = si->conn_status;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user