Skip to content

Commit

Permalink
Disable IPV6 since not supported by PlayStation network now + Only fr…
Browse files Browse the repository at this point in the history
…ee message if not already freed by failure when REGIST or session doesn't finish
  • Loading branch information
streetpea committed Oct 16, 2024
1 parent 80aa54b commit 2344da0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions lib/src/regist.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,9 @@ static ChiakiErrorCode regist_recv_response(ChiakiRegist *regist, ChiakiRegister
RudpMessage message;
err = chiaki_rudp_send_recv(regist->info.rudp, &message, NULL, 0, remote_counter, ACK, FINISH, 0, 3);
if(err != CHIAKI_ERR_SUCCESS)
{
CHIAKI_LOGW(regist->log, "REGIST - Failed to finish rudp, continuing...");
}
chiaki_rudp_message_pointers_free(&message);
else
chiaki_rudp_message_pointers_free(&message);
}

CHIAKI_LOGV(regist->log, "Regist response HTTP header:");
Expand Down
3 changes: 2 additions & 1 deletion lib/src/remote/holepunch.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
#define MSG_TYPE_REQ 0x06000000
#define MSG_TYPE_RESP 0x07000000
#define EXTRA_CANDIDATE_ADDRESSES 3
#define ENABLE_IPV6 false

static const char oauth_header_fmt[] = "Authorization: Bearer %s";

Expand Down Expand Up @@ -2588,7 +2589,7 @@ static ChiakiErrorCode send_offer(Session *session, int req_id, Candidate *local
goto cleanup;
}
// Only PS5 supports ipv6
if(session->console_type == CHIAKI_HOLEPUNCH_CONSOLE_TYPE_PS5)
if(session->console_type == CHIAKI_HOLEPUNCH_CONSOLE_TYPE_PS5 && ENABLE_IPV6)
{
Candidate *candidate_stun_ipv6 = &msg.conn_request->candidates[msg.conn_request->num_candidates];
candidate_stun_ipv6->type = CANDIDATE_TYPE_STUN;
Expand Down
5 changes: 2 additions & 3 deletions lib/src/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,9 @@ static ChiakiErrorCode session_thread_request_session(ChiakiSession *session, Ch
RudpMessage message;
err = chiaki_rudp_send_recv(session->rudp, &message, NULL, 0, remote_counter, ACK, FINISH, 0, 3);
if(err != CHIAKI_ERR_SUCCESS)
{
CHIAKI_LOGW(session->log, "SESSION START THREAD - Failed to finish rudp, continuing...");
}
chiaki_rudp_message_pointers_free(&message);
else
chiaki_rudp_message_pointers_free(&message);
}

ChiakiHttpResponse http_response;
Expand Down

0 comments on commit 2344da0

Please sign in to comment.