Skip to content

Commit

Permalink
Signaling stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
RipleyTom committed May 8, 2024
1 parent a525515 commit f4c81e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ bool lv2_socket_p2ps::handle_connected(p2ps_encapsulated_tcp* tcp_header, u8* da
return false;
}

nt_p2p_port::dump_packet(tcp_header);

if ((tcp_header->flags & static_cast<u8>(p2ps_tcp_flags::ACK)) == static_cast<u8>(p2ps_tcp_flags::ACK))
{
auto& tcpm = g_fxo->get<named_thread<tcp_timeout_monitor>>();
Expand Down Expand Up @@ -500,6 +498,10 @@ bool lv2_socket_p2ps::handle_listening(p2ps_encapsulated_tcp* tcp_header, [[mayb
}
}
}
else
{
sys_net.error("[P2PS] Unexpected U2S TCP flag received on listening socket: 0x%02X", tcp_header->flags);
}

// Ignore other packets?

Expand Down
5 changes: 4 additions & 1 deletion rpcs3/Emu/Cell/lv2/sys_net/nt_p2p_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ bool nt_p2p_port::recv_data()
return true;
}

// The packet is valid, check if it's bound
// The packet is valid
dump_packet(tcp_header);

// Check if it's bound
const u64 key_connected = (reinterpret_cast<struct sockaddr_in*>(&native_addr)->sin_addr.s_addr) | (static_cast<u64>(tcp_header->src_port) << 48) | (static_cast<u64>(tcp_header->dst_port) << 32);

{
Expand Down
4 changes: 4 additions & 0 deletions rpcs3/Emu/NP/signaling_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ void signaling_handler::process_incoming_messages()
schedule_repeat = false;
sent_packet.command = signal_finished_ack;
update_ext_si_status(si, false);
update_si_status(si, SCE_NP_SIGNALING_CONN_STATUS_INACTIVE, SCE_NP_SIGNALING_ERROR_TERMINATED_BY_PEER);
break;
case signal_finished_ack:
reply = false;
Expand Down Expand Up @@ -593,6 +594,9 @@ void signaling_handler::update_si_status(std::shared_ptr<signaling_info>& si, s3

void signaling_handler::update_ext_si_status(std::shared_ptr<signaling_info>& si, bool op_activated)
{
if (!si)
return;

if (op_activated && !si->op_activated)
{
si->op_activated = true;
Expand Down

0 comments on commit f4c81e2

Please sign in to comment.