mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-23 10:35:03 +00:00
setsockopt: return correct error values for EPROCUNAVAIL
This commit is contained in:
parent
ef1b08722f
commit
65305e87f9
@ -333,7 +333,7 @@ int PosixSocket::SetSocketOptions(int level, int optname, const void* optval, u3
|
|||||||
CASE_SETSOCKOPT_VALUE(ORBIS_NET_SO_USESIGNATURE, &sockopt_so_usesignature);
|
CASE_SETSOCKOPT_VALUE(ORBIS_NET_SO_USESIGNATURE, &sockopt_so_usesignature);
|
||||||
case ORBIS_NET_SO_LINGER: {
|
case ORBIS_NET_SO_LINGER: {
|
||||||
if (socket_type != ORBIS_NET_SOCK_STREAM) {
|
if (socket_type != ORBIS_NET_SOCK_STREAM) {
|
||||||
return ORBIS_NET_EPROCUNAVAIL;
|
return ORBIS_NET_ERROR_EPROCUNAVAIL;
|
||||||
}
|
}
|
||||||
if (optlen < sizeof(OrbisNetLinger)) {
|
if (optlen < sizeof(OrbisNetLinger)) {
|
||||||
LOG_ERROR(Lib_Net, "size missmatched! optlen = {} OrbisNetLinger={}", optlen,
|
LOG_ERROR(Lib_Net, "size missmatched! optlen = {} OrbisNetLinger={}", optlen,
|
||||||
@ -379,7 +379,7 @@ int PosixSocket::SetSocketOptions(int level, int optname, const void* optval, u3
|
|||||||
CASE_SETSOCKOPT_VALUE(ORBIS_NET_IP_MAXTTL, &sockopt_ip_maxttl);
|
CASE_SETSOCKOPT_VALUE(ORBIS_NET_IP_MAXTTL, &sockopt_ip_maxttl);
|
||||||
case ORBIS_NET_IP_HDRINCL: {
|
case ORBIS_NET_IP_HDRINCL: {
|
||||||
if (socket_type != ORBIS_NET_SOCK_RAW) {
|
if (socket_type != ORBIS_NET_SOCK_RAW) {
|
||||||
return ORBIS_NET_EPROCUNAVAIL;
|
return ORBIS_NET_ERROR_EPROCUNAVAIL;
|
||||||
}
|
}
|
||||||
return ConvertReturnErrorCode(
|
return ConvertReturnErrorCode(
|
||||||
setsockopt(sock, level, optname, (const char*)optval, optlen));
|
setsockopt(sock, level, optname, (const char*)optval, optlen));
|
||||||
|
Loading…
Reference in New Issue
Block a user