diff options
| author | Sepalani <sepalani@hotmail.fr> | 2026-02-18 21:49:41 +0400 |
|---|---|---|
| committer | Sepalani <sepalani@hotmail.fr> | 2026-02-19 13:30:17 +0400 |
| commit | 81b414c9c916d5d64a6a905a45a92cb4f64cc8a4 (patch) | |
| tree | 81589dcb27429a48bcaef073353269e90f5a7bc2 | |
| parent | 9323074ada4b1d372809dc71ed092efe8d0e4c8e (diff) | |
AMMediaboard: Add more connect log messages
| -rw-r--r-- | Source/Core/Core/HW/DVD/AMMediaboard.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/Core/HW/DVD/AMMediaboard.cpp b/Source/Core/Core/HW/DVD/AMMediaboard.cpp index 5cd69f8a62..87a928d40c 100644 --- a/Source/Core/Core/HW/DVD/AMMediaboard.cpp +++ b/Source/Core/Core/HW/DVD/AMMediaboard.cpp @@ -743,9 +743,11 @@ static s32 NetDIMMConnect(GuestSocket guest_socket, const GuestSocketAddress& gu WSAPOLLFD pfds[1]{{.fd = host_socket, .events = POLLOUT}}; + // TODO: Possible race between this socket's SetTimeOuts and others' const auto timeout = duration_cast<std::chrono::milliseconds>(std::chrono::microseconds{s_timeouts[0]}); + // TODO: Might block if timeout is too big const int poll_result = PlatformPoll(pfds, timeout); if (poll_result < 0) [[unlikely]] @@ -757,7 +759,7 @@ static s32 NetDIMMConnect(GuestSocket guest_socket, const GuestSocketAddress& gu return SOCKET_ERROR; } - if ((pfds[0].revents & POLLOUT) == 0) + if ((pfds[0].revents & (POLLOUT | POLLERR)) == 0) { // Timeout. s_last_error = SSC_EWOULDBLOCK; @@ -776,10 +778,14 @@ static s32 NetDIMMConnect(GuestSocket guest_socket, const GuestSocketAddress& gu } else if (so_error == 0) { + INFO_LOG_FMT(AMMEDIABOARD_NET, "NetDIMMConnect: connect( {}({}) ) succeeded", host_socket, + u32(guest_socket)); s_last_error = SSC_SUCCESS; return 0; } + ERROR_LOG_FMT(AMMEDIABOARD_NET, "NetDIMMConnect: connect( {}({}) ) failed with error {}: {}", + host_socket, u32(guest_socket), so_error, Common::DecodeNetworkError(so_error)); s_last_error = SOCKET_ERROR; return SOCKET_ERROR; } |
