From db6e54740d51622cfdda6ccc044166d7b0eb4c3f Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Mon, 13 Mar 2023 19:41:03 -0700
Subject: [PATCH] Include protocol and client IP address in FastCGI send error
 log msg

---
 src/sbbs3/websrvr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/sbbs3/websrvr.c b/src/sbbs3/websrvr.c
index 3bfd174acc..2bcf1e6777 100644
--- a/src/sbbs3/websrvr.c
+++ b/src/sbbs3/websrvr.c
@@ -4765,7 +4765,8 @@ static BOOL exec_fastcgi(http_session_t *session)
 	memset(br->reserved, 0, sizeof(br->reserved));
 	int result = sendsocket(sock, (void *)msg, msglen);
 	if (result != msglen) {
-		lprintf(LOG_ERR, "%04d !ERROR %d sending %d bytes to FastCGI socket (send returned %d)", session->socket, ERROR_VALUE, msglen, result);
+		lprintf(LOG_ERR, "%04d %s [%s] !ERROR %d sending %d bytes to FastCGI socket (send returned %d)"
+			,session->socket, session->client.protocol, session->host_ip, ERROR_VALUE, msglen, result);
 		free(msg);
 		closesocket(sock);
 		return FALSE;
-- 
GitLab