mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-19 06:31:29 +00:00
fixups
This commit is contained in:
@@ -524,7 +524,7 @@ void BSD::ExecuteWork(HLERequestContext& ctx, Work work) {
|
||||
|
||||
std::pair<s32, Network::Errno> BSD::SocketImpl(Network::Domain domain, Network::Type type, Network::Protocol protocol) {
|
||||
// user bsd:u has restrictions on SOCK_SEQPACKET and SOCK_RAW
|
||||
LOG_DEBUG(Network, "domain={},type,protocol={}", u32(domain), u32(type), u32(protocol));
|
||||
LOG_DEBUG(Network, "domain={},type={},protocol={}", u32(domain), u32(type), u32(protocol));
|
||||
if (is_user && (type == Network::Type::SEQPACKET || type == Network::Type::RAW)) {
|
||||
if (type == Network::Type::RAW && domain == Network::Domain::INET && protocol == Network::Protocol::ICMP) {
|
||||
// fine, can use on bsd:s and bsd:u
|
||||
@@ -570,8 +570,8 @@ std::pair<s32, Network::Errno> BSD::SocketImpl(Network::Domain domain, Network::
|
||||
|
||||
#if defined(__unix__) && !defined(__APPLE__)
|
||||
// ...only unix has this issue it seems, ICMP works otherwise fine on win
|
||||
if (bsd_errno != Network::Errno::E_SUCCESS
|
||||
&& (protocol == Network::Protocol::ICMP || protocol == Network::Protocol::ICMPV6)) {
|
||||
if ((protocol == Network::Protocol::ICMP || protocol == Network::Protocol::ICMPV6)
|
||||
&& bsd_errno != Network::Errno::E_SUCCESS) {
|
||||
LOG_WARNING(Network, "Using ICMP emulated socket");
|
||||
descriptor.socket = std::make_shared<Network::IcmpSocket>();
|
||||
descriptor.socket->fd = fd;
|
||||
|
||||
@@ -1127,6 +1127,7 @@ std::pair<Socket::AcceptResult, Errno> Socket::Accept() {
|
||||
|
||||
Errno Socket::Connect(Network::SockAddrIn addr_in) {
|
||||
auto const host_addr_in = TranslateFromSockAddrIn(addr_in);
|
||||
LOG_INFO(Network, "len={}, family={} - {}.{}.{}.{}:{}", addr_in.len, addr_in.family, addr_in.ip[0], addr_in.ip[1], addr_in.ip[2], addr_in.ip[3], addr_in.portno);
|
||||
if (EnableNonBlock(fd, false)) {
|
||||
if (connect(fd, reinterpret_cast<sockaddr const*>(&host_addr_in), sizeof(host_addr_in)) != SOCKET_ERROR) {
|
||||
if (EnableNonBlock(fd, true)) {
|
||||
|
||||
Reference in New Issue
Block a user