From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 4 Jun 2017 14:42:13 +0000 (+0000)
Subject: Remove code that has been pointless since 2009
X-Git-Tag: v_3_0_27~137
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/@default-cgi@/coding.html?a=commitdiff_plain;h=77c7aac50e2ec2d9e7fdb42cef5cfc3f772facc2;p=privoxy.git

Remove code that has been pointless since 2009

This should have been done with gateway.c r1.52 which
rendered the global keep_alive_timeout obsolete.
---

diff --git a/gateway.c b/gateway.c
index 9bde9e61..0f146539 100644
--- a/gateway.c
+++ b/gateway.c
@@ -1,4 +1,4 @@
-const char gateway_rcs[] = "$Id: gateway.c,v 1.99 2016/10/25 10:46:56 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.100 2016/12/24 16:00:49 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/gateway.c,v $
@@ -134,7 +134,6 @@ static const char socks_userid[] = "anonymous";
 #ifdef FEATURE_CONNECTION_SHARING
 
 #define MAX_REUSABLE_CONNECTIONS 100
-static unsigned int keep_alive_timeout = DEFAULT_KEEP_ALIVE_TIMEOUT;
 
 static struct reusable_connection reusable_connection[MAX_REUSABLE_CONNECTIONS];
 static int mark_connection_unused(const struct reusable_connection *connection);
@@ -560,25 +559,6 @@ static int mark_connection_unused(const struct reusable_connection *connection)
    return socket_found;
 
 }
-
-
-/*********************************************************************
- *
- * Function    :  set_keep_alive_timeout
- *
- * Description :  Sets the timeout after which open
- *                connections will no longer be reused.
- *
- * Parameters  :
- *          1  :  timeout = The timeout in seconds.
- *
- * Returns     :  void
- *
- *********************************************************************/
-void set_keep_alive_timeout(unsigned int timeout)
-{
-   keep_alive_timeout = timeout;
-}
 #endif /* def FEATURE_CONNECTION_SHARING */
 
 
diff --git a/gateway.h b/gateway.h
index 3e5284b9..4eb69abe 100644
--- a/gateway.h
+++ b/gateway.h
@@ -1,6 +1,6 @@
 #ifndef GATEWAY_H_INCLUDED
 #define GATEWAY_H_INCLUDED
-#define GATEWAY_H_VERSION "$Id: gateway.h,v 1.23 2013/11/24 14:23:28 fabiankeil Exp $"
+#define GATEWAY_H_VERSION "$Id: gateway.h,v 1.24 2016/12/24 16:00:49 fabiankeil Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/gateway.h,v $
@@ -52,7 +52,6 @@ extern jb_socket forwarded_connect(const struct forward_spec * fwd,
 #define DEFAULT_KEEP_ALIVE_TIMEOUT 180
 
 #ifdef FEATURE_CONNECTION_SHARING
-extern void set_keep_alive_timeout(unsigned int timeout);
 extern void initialize_reusable_connections(void);
 extern void forget_connection(jb_socket sfd);
 extern void remember_connection(const struct reusable_connection *connection);
diff --git a/loadcfg.c b/loadcfg.c
index 9ffd5095..4944a415 100644
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1,4 +1,4 @@
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.159 2017/05/25 11:17:38 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.160 2017/05/29 10:02:11 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
@@ -1836,11 +1836,7 @@ struct configuration_spec * load_config(void)
 #ifdef FEATURE_CONNECTION_SHARING
    if (config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE)
    {
-      if (config->multi_threaded)
-      {
-         set_keep_alive_timeout(config->keep_alive_timeout);
-      }
-      else
+      if (!config->multi_threaded)
       {
          /*
           * While we could use keep-alive without multiple threads