-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.101 2009/05/13 18:20:54 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.105 2009/09/06 14:15:46 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
* so we will make argc and argv global.
*/
int Argc = 0;
-const char **Argv = NULL;
+char * const * Argv = NULL;
static struct file_list *current_configfile = NULL;
/* *************************************************************************
* connection-sharing (0|1)
* *************************************************************************/
-#ifdef FEATURE_CONNECTION_KEEP_ALIVE
+#ifdef FEATURE_CONNECTION_SHARING
case hash_connection_sharing :
if ((*arg != '\0') && (0 != atoi(arg)))
{
if (*arg != '\0')
{
int timeout = atoi(arg);
- if (0 <= timeout)
+ if (0 < timeout)
{
config->feature_flags |= RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE;
config->keep_alive_timeout = (unsigned int)timeout;
}
}
-#ifdef FEATURE_CONNECTION_KEEP_ALIVE
+#ifdef FEATURE_CONNECTION_SHARING
if (config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE)
{
if (config->multi_threaded)
"Config option single-threaded disables connection keep-alive.");
}
}
-#endif
+ 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 /* def FEATURE_CONNECTION_SHARING */
if (NULL == config->proxy_args)
{