Remove code that has been pointless since 2009
authorFabian Keil <fk@fabiankeil.de>
Sun, 4 Jun 2017 14:42:13 +0000 (14:42 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sun, 4 Jun 2017 14:42:13 +0000 (14:42 +0000)
This should have been done with gateway.c r1.52 which
rendered the global keep_alive_timeout obsolete.

gateway.c
gateway.h
loadcfg.c

index 9bde9e6..0f14653 100644 (file)
--- 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 */
 
 
index 3e5284b..4eb69ab 100644 (file)
--- 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);
index 9ffd509..4944a41 100644 (file)
--- 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