From 5b97e1a5507bbbd6b046ae8eb09f0fe06a897df0 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 26 Dec 2010 16:18:30 +0000 Subject: [PATCH] Let mark_server_socket_tainted() always mark the server socket tainted, just don't talk about it in cases where it has no effect. It doesn't change Privoxy's behaviour, but makes understanding the log file easier. --- jcc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jcc.c b/jcc.c index 71956ebc..c92f5f60 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.332 2010/12/26 15:30:28 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.333 2010/12/26 16:13:47 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -1151,14 +1151,20 @@ static void verify_request_length(struct client_state *csp) *********************************************************************/ static void mark_server_socket_tainted(struct client_state *csp) { + /* + * For consistency we always mark the server socket + * tainted, however, to reduce the log noise we only + * emit a log message if the server socket could have + * actually been reused. + */ if ((csp->flags & CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE) && !(csp->flags |= CSP_FLAG_SERVER_SOCKET_TAINTED)) { log_error(LOG_LEVEL_CONNECT, "Marking the server socket %d tainted.", csp->server_connection.sfd); - csp->flags |= CSP_FLAG_SERVER_SOCKET_TAINTED; } + csp->flags |= CSP_FLAG_SERVER_SOCKET_TAINTED; } /********************************************************************* -- 2.39.2