mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 03:38:38 +12:00
Signaling: report status inactive on unknown connection
This commit is contained in:
parent
8cd6b9275a
commit
bcce3acd5f
2 changed files with 15 additions and 0 deletions
|
@ -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);
|
const auto si = sigh.get_sig_infos(conn_id);
|
||||||
|
|
||||||
if (!si)
|
if (!si)
|
||||||
|
{
|
||||||
|
*conn_status = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||||
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
*conn_status = si->conn_status;
|
*conn_status = si->conn_status;
|
||||||
|
|
||||||
|
|
|
@ -448,21 +448,33 @@ error_code sceNpMatching2SignalingGetConnectionStatus(
|
||||||
auto [res, npid] = nph.local_get_npid(roomId, memberId);
|
auto [res, npid] = nph.local_get_npid(roomId, memberId);
|
||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
|
{
|
||||||
|
*connStatus = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||||
return res;
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
if (np::is_same_npid(nph.get_npid(), *npid))
|
if (np::is_same_npid(nph.get_npid(), *npid))
|
||||||
|
{
|
||||||
|
*connStatus = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||||
return SCE_NP_SIGNALING_ERROR_OWN_NP_ID;
|
return SCE_NP_SIGNALING_ERROR_OWN_NP_ID;
|
||||||
|
}
|
||||||
|
|
||||||
auto& sigh = g_fxo->get<named_thread<signaling_handler>>();
|
auto& sigh = g_fxo->get<named_thread<signaling_handler>>();
|
||||||
|
|
||||||
auto conn_id = sigh.get_conn_id_from_npid(*npid);
|
auto conn_id = sigh.get_conn_id_from_npid(*npid);
|
||||||
if (!conn_id)
|
if (!conn_id)
|
||||||
|
{
|
||||||
|
*connStatus = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||||
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
const auto si = sigh.get_sig_infos(*conn_id);
|
const auto si = sigh.get_sig_infos(*conn_id);
|
||||||
|
|
||||||
if (!si)
|
if (!si)
|
||||||
|
{
|
||||||
|
*connStatus = SCE_NP_SIGNALING_CONN_STATUS_INACTIVE;
|
||||||
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
return SCE_NP_SIGNALING_ERROR_CONN_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
*connStatus = si->conn_status;
|
*connStatus = si->conn_status;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue