mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-20 04:16:34 +00:00
bsd: Check if socket is bound before calling RecvFrom() (#3761)
This commit is contained in:
parent
5af1327068
commit
e43390c723
1 changed files with 8 additions and 1 deletions
|
@ -235,6 +235,13 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||||
shouldBlockAfterOperation = true;
|
shouldBlockAfterOperation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Socket.IsBound)
|
||||||
|
{
|
||||||
|
receiveSize = -1;
|
||||||
|
|
||||||
|
return LinuxError.EOPNOTSUPP;
|
||||||
|
}
|
||||||
|
|
||||||
receiveSize = Socket.ReceiveFrom(buffer[..size], ConvertBsdSocketFlags(flags), ref temp);
|
receiveSize = Socket.ReceiveFrom(buffer[..size], ConvertBsdSocketFlags(flags), ref temp);
|
||||||
|
|
||||||
remoteEndPoint = (IPEndPoint)temp;
|
remoteEndPoint = (IPEndPoint)temp;
|
||||||
|
@ -519,4 +526,4 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue