Added some error comments.

This commit is contained in:
Matthew Parlane 2012-02-19 14:29:57 +13:00
parent 40c9f481df
commit ef4ac51170
1 changed files with 14 additions and 13 deletions

View File

@ -539,20 +539,20 @@ static int getNetErrorCode(int ret, std::string caller, bool isRW)
WARN_LOG(WII_IPC_NET, "Find out why this happened, looks like PEEK failure?"); WARN_LOG(WII_IPC_NET, "Find out why this happened, looks like PEEK failure?");
return -1; return -1;
case ERRORCODE(ECONNRESET): case ERRORCODE(ECONNRESET):
return -15; return -15; // ECONNRESET
case ERRORCODE(EISCONN): case ERRORCODE(EISCONN):
return -30; return -30; // EISCONN
case ERRORCODE(ENOTCONN): case ERRORCODE(ENOTCONN):
return -6; return -6; // EAGAIN
case ERRORCODE(EWOULDBLOCK): case ERRORCODE(EWOULDBLOCK):
case ERRORCODE(EINPROGRESS): case ERRORCODE(EINPROGRESS):
if(isRW){ if(isRW){
return -6; return -6; // EAGAIN
}else{ }else{
return -26; return -26; // EINPROGRESS
} }
case EITHER(WSA_INVALID_HANDLE, EBADF): case EITHER(WSA_INVALID_HANDLE, EBADF):
return -26; return -26; // EINPROGRESS
default: default:
return -1; return -1;
} }
@ -959,11 +959,12 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommand(u32 _Command,
} }
case IOCTL_SO_INETPTON: case IOCTL_SO_INETPTON:
{
WARN_LOG(WII_IPC_NET, "IOCTL_SO_INETPTON " WARN_LOG(WII_IPC_NET, "IOCTL_SO_INETPTON "
"(Translating: %s)", Memory::GetPointer(_BufferIn)); "(Translating: %s)", Memory::GetPointer(_BufferIn));
return inet_pton((char*)Memory::GetPointer(_BufferIn), Memory::GetPointer(_BufferOut+4)); return inet_pton((char*)Memory::GetPointer(_BufferIn), Memory::GetPointer(_BufferOut+4));
break; break;
}
case IOCTL_SO_POLL: case IOCTL_SO_POLL:
{ {
u32 unknown = Memory::Read_U32(_BufferIn); u32 unknown = Memory::Read_U32(_BufferIn);