From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 19 Jul 2009 10:07:46 +0000 (+0000)
Subject: If connection-sharing is enabled but keep-alive-timeout isn't, log a warning and... 
X-Git-Tag: v_3_0_14~13
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/@default-cgi@/static/gitweb.js?a=commitdiff_plain;h=e6fba62fd97029e86c0851d3775881817953fd71;p=privoxy.git

If connection-sharing is enabled but keep-alive-timeout isn't, log a warning and disable it.
---

diff --git a/loadcfg.c b/loadcfg.c
index 94cf087f..62b943df 100644
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1,4 +1,4 @@
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.102 2009/05/16 13:27:20 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.103 2009/06/15 20:50:56 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
@@ -1343,6 +1343,12 @@ struct configuration_spec * load_config(void)
             "Config option single-threaded disables connection keep-alive.");
       }
    }
+   else if ((config->feature_flags & RUNTIME_FEATURE_CONNECTION_SHARING))
+   {
+      log_error(LOG_LEVEL_ERROR, "Config option connection-sharing "
+         "has no effect if keep-alive-timeout isn't set.");
+      config->feature_flags &= ~RUNTIME_FEATURE_CONNECTION_SHARING;
+   }
 #endif
 
    if (NULL == config->proxy_args)