From 004a30545873496d279b4975ba74f3d334291dfe Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Fri, 22 May 2020 00:50:18 +0200 Subject: client_socket was being accidentally reset to -1 That was making the telnet debug server to crash, so fortunately that solved it while also having the neat features from dynstr. --- libpcsxcore/debug.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'libpcsxcore/debug.c') diff --git a/libpcsxcore/debug.c b/libpcsxcore/debug.c index e2e2992f..463df73b 100644 --- a/libpcsxcore/debug.c +++ b/libpcsxcore/debug.c @@ -395,7 +395,16 @@ void DebugVSync() { return; } - client_socket = GetClient(server_socket); + if (client_socket < 1) + { + client_socket = GetClient(server_socket); + + if (client_socket > 0) + { + DebugHello(); + } + } + ProcessCommands(); } @@ -466,7 +475,17 @@ void ProcessDebug() { } } while (paused) { - client_socket = GetClient(server_socket); + + if (client_socket < 1) + { + client_socket = GetClient(server_socket); + + if (client_socket > 0) + { + DebugHello(); + } + } + ProcessCommands(); GPU_updateLace(); SysUpdate(); @@ -497,7 +516,6 @@ static void ProcessCommands() { case READ_SOCKET_SHUTDOWN: /* Fall through. */ default: - perror("recv() error"); return; } -- cgit v1.2.3