sceNetAdhocMatching: Don't list a member twice

A child the host accepts right after another one learns about that one
twice: from the sibling list in its accept packet, and from the BIRTH
packet the host sends about it. It added it both times, so with three or
four players the last one to join had an extra member (pspautotests
net/adhoc/group/matching, not recorded on PSPs yet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 authored and Henrik Rydgård committed 2026-10-29 22:39:05 +01:00
1 parent db7c9ede34
commit ae906cb292
1 file changed
+5
+5
View File
@@ -1024,6 +1024,11 @@ void actOnBirthPacket(SceNetAdhocMatchingContext * context, SceNetEtherAddr * se
SceNetEtherAddr mac;
memcpy(&mac, context->rxbuf + 1, sizeof(SceNetEtherAddr));
// A child accepted just after another already has it from its accept packet's sibling list.
if (findPeer(context, &mac) != NULL || isMacMatch(&mac, &context->mac)) {
return;
}
// Allocate Memory
SceNetAdhocMatchingMemberInternal * sibling = (SceNetAdhocMatchingMemberInternal *)malloc(sizeof(SceNetAdhocMatchingMemberInternal));