From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 21 Oct 2012 12:51:07 +0000 (+0000)
Subject: When closing the client socket in serve(), also log if a config file change has been... 
X-Git-Tag: v_3_0_20~230
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/static/@default-cgi@toggle?a=commitdiff_plain;h=4c43a812f285a6bae4119074b385a2c245bd395d;p=privoxy.git

When closing the client socket in serve(), also log if a config file change has been detected
---

diff --git a/jcc.c b/jcc.c
index 3ab774b6..550b00bb 100644
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.395 2012/10/21 12:49:54 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.396 2012/10/21 12:50:46 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -2513,6 +2513,7 @@ static void serve(struct client_state *csp)
    static int monitor_thread_running = 0;
 #endif /* def FEATURE_CONNECTION_SHARING */
    int continue_chatting = 0;
+   int config_file_change_detected = 0; /* Only used for debugging */
 
    log_error(LOG_LEVEL_CONNECT, "Accepted connection from %s on socket %d",
       csp->ip_addr_str, csp->cfd);
@@ -2520,7 +2521,6 @@ static void serve(struct client_state *csp)
    do
    {
       unsigned int latency;
-      int config_file_change_detected = 0; /* Only used for debugging */
 
       chat(csp);
 
@@ -2676,9 +2676,11 @@ static void serve(struct client_state *csp)
    if (csp->cfd != JB_INVALID_SOCKET)
    {
       log_error(LOG_LEVEL_CONNECT, "Closing client socket %d. "
-         "Keep-alive: %u, Socket alive: %u. Data available: %u.",
+         "Keep-alive: %u, Socket alive: %u. Data available: %u. "
+         "Configuration file change detected: %u.",
          csp->cfd, 0 != (csp->flags & CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE),
-         socket_is_still_alive(csp->cfd), data_is_available(csp->cfd, 0));
+         socket_is_still_alive(csp->cfd), data_is_available(csp->cfd, 0),
+         config_file_change_detected);
       drain_and_close_socket(csp->cfd);
    }