From: Fabian Keil Date: Sat, 12 Sep 2009 12:35:14 +0000 (+0000) Subject: Turn mark_server_socket_tainted() into a nop if the server socket is already tainted. X-Git-Tag: v_3_0_15~62 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;h=d62c7953a673db419b3eec380e37a48c31761b63;p=privoxy.git Turn mark_server_socket_tainted() into a nop if the server socket is already tainted. Tainting it twice doesn't hurt, but logging the same message twice is pointless. --- diff --git a/jcc.c b/jcc.c index f0e7fe9a..da4a7f52 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.289 2009/09/10 14:58:54 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.290 2009/09/12 12:32:26 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -1231,7 +1231,8 @@ static void verify_request_length(struct client_state *csp) *********************************************************************/ static void mark_server_socket_tainted(struct client_state *csp) { - if ((csp->flags & CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE)) + 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->sfd);