]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix if 'http_port' not given in conf file
authorwessels <>
Thu, 15 May 1997 07:27:09 +0000 (07:27 +0000)
committerwessels <>
Thu, 15 May 1997 07:27:09 +0000 (07:27 +0000)
src/cache_cf.cc

index ed224ab9e8d67a63535141fcae4287d3df337d76..bf0c98242208c9b91be81260e4b069f7a80e3a81 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_cf.cc,v 1.186 1997/05/15 01:18:42 wessels Exp $
+ * $Id: cache_cf.cc,v 1.187 1997/05/15 01:27:09 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -1372,7 +1372,6 @@ configSetFactoryDefaults(void)
     Config.appendDomain = safe_xstrdup(DefaultAppendDomain);
     Config.errHtmlText = safe_xstrdup(DefaultErrHtmlText);
     Config.Port.n_http = 0;
-    Config.Port.http[0] = DefaultHttpPortNum;
     Config.Port.icp = DefaultIcpPortNum;
     Config.Log.log_fqdn = DefaultLogLogFqdn;
     Config.Log.log = safe_xstrdup(DefaultCacheLogFile);
@@ -1453,6 +1452,8 @@ configDoConfigure(void)
        Config.appendDomainLen = strlen(Config.appendDomain);
     else
        Config.appendDomainLen = 0;
+    if (Config.Port.n_http == 0)
+       Config.Port.http[Config.Port.n_http++] = DefaultHttpPort;
 }
 
 /* Parse a time specification from the config file.  Store the