Opera v1024 uses connect() error code to work out if a socket connected successfully. Added correct return code for windows equivalent error code.

This commit is contained in:
Matthew Parlane 2012-01-19 19:31:35 +13:00 committed by Shawn Hoffman
parent 1df04e11a4
commit 2e83a5271f
1 changed files with 28 additions and 32 deletions

View File

@ -481,6 +481,8 @@ static int getNetErrorCode(int ret, std::string caller)
return -1;
case 10054:
return -15;
case 10056:
return -30;
case 10035:
return -26;
case 6:
@ -785,7 +787,7 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommand(u32 _Command,
int ret = getsockname(sock, &sa, &sa_len);
Memory::Write_U8(BufferOutSize, _BufferOut);
Memory::Write_U8(sa.sa_family, _BufferOut+1);
Memory::Write_U8(sa.sa_family & 0xFF, _BufferOut+1);
Memory::WriteBigEData((u8*)&sa.sa_data, _BufferOut+2, BufferOutSize-2);
return ret;
}
@ -794,7 +796,7 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommand(u32 _Command,
INFO_LOG(WII_IPC_NET, "/dev/net/ip/top::IOCtl request IOCTL_SO_GETHOSTID "
"(BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
_BufferIn, BufferInSize, _BufferOut, BufferOutSize);
return 10 << 24 | 1 << 8 | 30;
return 192 << 24 | 168 << 16 | 1 << 8 | 150;
case IOCTL_SO_INETATON:
{
@ -1148,13 +1150,8 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommandV(u32 _Parameter, SIOCtlVBuffe
return totallen;
}else
#endif
if (fromlen){
ret = recvfrom(sock, buf, len, flags,
fromlen ? (struct sockaddr*) &addr : NULL, fromlen ? &fromlen : 0);
}else{
ret = recv(sock, buf, len, flags);
}
if (BufferOutSize2 != 0)
{
//something not quite right below, need to verify
@ -1242,7 +1239,6 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommandV(u32 _Parameter, SIOCtlVBuffe
INFO_LOG(WII_IPC_NET,"/dev/net/ip/top::IOCtlV request 0x%x (BufferIn: (%08x, %i), BufferIn2: (%08x, %i)",
_Parameter, _BufferIn, BufferInSize, _BufferIn2, BufferInSize2);
break;
}
return 0;
}