Hi guys!

This afternoon I was testing Squid3 (needed the ICAP-client functionality) and 
it wouldn't start as a virtual-host httpd-accelerator (the -V option on the 
command-line), saying "FATAL: No http_port specified" even though it really 
was specified in the configuration file...

I found out this is because mainParseOptions() is called _before_ 
parseConfigFile() in main.cc, so of course Config.Sockaddr.http is NULL when 
handling the -V option. The attached patch fixes this.

Patching that was no big deal, but it's better when it works out of the box ;) 
So here you are, my tiny contribution to the great Squid!


Keep up the good work,

-- 
Sébastien Raveau
computer and network security student
head of the hawKeye network monitor project
http://hawkeye.sourceforge.net/
--- main.cc.orig	2006-12-15 22:01:43.000000000 +0100
+++ main.cc	2006-12-15 22:01:11.000000000 +0100
@@ -1167,12 +1167,6 @@
 
     WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000);
 
-#endif
-
-    mainParseOptions(argc, argv);
-
-#if USE_WIN32_SERVICE
-
     if (opt_install_service)
     {
         WIN32_InstallService();
@@ -1226,6 +1220,8 @@
         if (checkRunningPid())
             exit(1);
 
+    mainParseOptions(argc, argv);
+
 #if TEST_ACCESS
 
     comm_init();

Attachment: pgp8wkLwOUfTU.pgp
Description: PGP signature

Reply via email to