From a1a197e68506589f3cd1964bdec07ea5fb6fee3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 31 Oct 2026 09:04:00 +0100 Subject: [PATCH] sceNetAdhoc: A relay PDP send off the network doesn't need a session Off the network the datagram reaches nobody and the send succeeds, but the session was recovered first, and a send whose session wasn't up returned WOULD_BLOCK (pspautotests net/adhoc/pair/vanish, PDP send after leaving). Co-Authored-By: Claude Opus 5.5 --- Core/HLE/AdhocTransportRelay.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Core/HLE/AdhocTransportRelay.cpp b/Core/HLE/AdhocTransportRelay.cpp index 2034bd35bd..c6364e15c1 100644 --- a/Core/HLE/AdhocTransportRelay.cpp +++ b/Core/HLE/AdhocTransportRelay.cpp @@ -181,17 +181,18 @@ bool RelayTransport::PdpTakeDatagram(int id, SceNetEtherAddr *mac, uint16_t *por } static int pdp_send_postoffice(int idx, const SceNetEtherAddr *daddr, uint16_t dport, const void *data, int len) { + // Out of the group, it goes into the air and reaches nobody (pspautotests net/adhoc/pair/vanish), + // whether or not the relay session is up. + if (offAdhocNetwork() && !isLocalMac(daddr)) { + return 0; + } + AdhocSocket *internal = adhocSockets[idx]; void *pdp_sock = pdp_postoffice_recover(idx); if (pdp_sock == NULL) { return SOCKET_ERROR; } - // Out of the group, it goes into the air and reaches nobody (pspautotests net/adhoc/pair/vanish). - if (offAdhocNetwork() && !isLocalMac(daddr)) { - return 0; - } - SceNetEtherAddr fixed_daddr = *daddr; fixGameMac(&fixed_daddr);