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