mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Fix accept() bug, which was using the wrong isRW for error conversion.
Also fixed a debug issue where local_name is used uninitialised.
This commit is contained in:
parent
a317391e3d
commit
f811dbb575
@ -236,7 +236,7 @@ void WiiSocket::update(bool read, bool write, bool except)
|
|||||||
|
|
||||||
socklen_t addrlen = sizeof(sockaddr_in);
|
socklen_t addrlen = sizeof(sockaddr_in);
|
||||||
int ret = (s32)accept(fd, (sockaddr*)&local_name, &addrlen);
|
int ret = (s32)accept(fd, (sockaddr*)&local_name, &addrlen);
|
||||||
ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", false);
|
ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", true);
|
||||||
|
|
||||||
WiiSockMan::Convert(local_name, *wii_name, addrlen);
|
WiiSockMan::Convert(local_name, *wii_name, addrlen);
|
||||||
}
|
}
|
||||||
@ -433,6 +433,7 @@ void WiiSocket::update(bool read, bool write, bool except)
|
|||||||
flags &= SO_MSG_OOB;
|
flags &= SO_MSG_OOB;
|
||||||
|
|
||||||
sockaddr_in local_name;
|
sockaddr_in local_name;
|
||||||
|
memset(&local_name, 0, sizeof(sockaddr_in));
|
||||||
if (has_destaddr)
|
if (has_destaddr)
|
||||||
{
|
{
|
||||||
WiiSockAddrIn* wii_name = (WiiSockAddrIn*)Memory::GetPointer(BufferIn2 + 0x0C);
|
WiiSockAddrIn* wii_name = (WiiSockAddrIn*)Memory::GetPointer(BufferIn2 + 0x0C);
|
||||||
|
Loading…
Reference in New Issue
Block a user