From: Fabian Keil Date: Sun, 26 Dec 2010 16:18:30 +0000 (+0000) Subject: Let mark_server_socket_tainted() always mark the server socket tainted, just don... X-Git-Tag: v_3_0_18~369 X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/static/gitweb.js?a=commitdiff_plain;h=5b97e1a5507bbbd6b046ae8eb09f0fe06a897df0;p=privoxy.git 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. --- 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; } /*********************************************************************