From: serassio <> Date: Sat, 23 Apr 2005 18:28:11 +0000 (+0000) Subject: Bug #1196: Unable to run "squid -k" when hostname cannot be determined X-Git-Tag: SQUID_3_0_PRE4~804 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=478c4f2f4859793279a0987cc5e8b1b769a1d9cb;p=thirdparty%2Fsquid.git Bug #1196: Unable to run "squid -k" when hostname cannot be determined Forward port of 2.5 patch. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 1d10037738..dea4b85e8f 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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; } diff --git a/src/globals.h b/src/globals.h index ddb0e7866f..3c5bac7811 100644 --- a/src/globals.h +++ b/src/globals.h @@ -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 */ diff --git a/src/main.cc b/src/main.cc index 0a27228f06..f90a5bcdf0 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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" */