]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1196: Unable to run "squid -k" when hostname cannot be determined
authorserassio <>
Sat, 23 Apr 2005 18:28:11 +0000 (18:28 +0000)
committerserassio <>
Sat, 23 Apr 2005 18:28:11 +0000 (18:28 +0000)
Forward port of 2.5 patch.

src/cache_cf.cc
src/globals.h
src/main.cc

index 1d10037738c0e848f303dd5600dadd61bd8e6665..dea4b85e8fe1bf9976bfe0dab20208677891a58a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.469 2005/04/18 21:52:42 hno Exp $
+ * $Id: cache_cf.cc,v 1.470 2005/04/23 12:28:11 serassio Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -371,11 +371,14 @@ parseConfigFile(const char *file_name)
         enter_suid();
     }
 
-    configDoConfigure();
-    cachemgrRegister("config",
-                     "Current Squid Configuration",
-                     dump_config,
-                     1, 1);
+    if (opt_send_signal == -1) {
+        configDoConfigure();
+        cachemgrRegister("config",
+                         "Current Squid Configuration",
+                         dump_config,
+                         1, 1);
+    }
+
     return err_count;
 }
 
index ddb0e7866ff2329dceac13b346f933080804057f..3c5bac7811b8da97f7b88d98724d4a59fc781f75 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.130 2005/04/18 21:52:42 hno Exp $
+ * $Id: globals.h,v 1.131 2005/04/23 12:28:11 serassio Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -177,4 +177,5 @@ extern int ssl_ctx_ex_index_dont_verify_domain; /* -1 */
 extern int opt_no_daemon; /* 0 */
 
 extern const char *external_acl_message;      /* NULL */
+extern int opt_send_signal;    /* -1 */
 #endif /* SQUID_GLOBALS_H */
index 0a27228f0600f2766bd1e3f006bc85a0178ac95d..f90a5bcdf0fc388ccfb6fea601bc1aa1fe6e1498 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.408 2005/04/18 21:52:42 hno Exp $
+ * $Id: main.cc,v 1.409 2005/04/23 12:28:11 serassio Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -65,7 +65,6 @@ void WINAPI WIN32_svcHandler(DWORD);
 /* for error reporting from xmalloc and friends */
 SQUIDCEXTERN void (*failure_notify) (const char *);
 
-static int opt_send_signal = -1;
 static int opt_parse_cfg_only = 0;
 static char *opt_syslog_facility = NULL;
 static int icpPortNumOverride = 1;     /* Want to detect "-u 0" */