*
*/
-#include "squid.h"
+#include "squid-old.h"
#include "AccessLogEntry.h"
#if USE_ADAPTATION
#include "adaptation/Config.h"
#include "event.h"
#include "EventLoop.h"
#include "ExternalACL.h"
+#include "format/Token.h"
#include "fs/Module.h"
#include "PeerSelectState.h"
+#include "SquidDns.h"
#include "Store.h"
#include "ICP.h"
#include "ident/Ident.h"
#include "ipc/Strand.h"
#include "ip/tools.h"
#include "SquidTime.h"
+#include "StatCounters.h"
#include "SwapDir.h"
#include "forward.h"
#include "MemPool.h"
opt_send_signal = SIGHUP;
else if (!strncmp(optarg, "rotate", strlen(optarg)))
/** \li On rotate send SIGQUIT or SIGUSR1. */
-#ifdef _SQUID_LINUX_THREADS_
-
+#if defined(_SQUID_LINUX_THREADS_)
opt_send_signal = SIGQUIT;
-
#else
-
opt_send_signal = SIGUSR1;
-
#endif
else if (!strncmp(optarg, "debug", strlen(optarg)))
/** \li On debug send SIGTRAP or SIGUSR2. */
-#ifdef _SQUID_LINUX_THREADS_
-
+#if defined(_SQUID_LINUX_THREADS_)
opt_send_signal = SIGTRAP;
-
#else
-
opt_send_signal = SIGUSR2;
-
#endif
else if (!strncmp(optarg, "shutdown", strlen(optarg)))
htcpInit();
#endif
#if SQUID_SNMP
-
snmpConnectionOpen();
#endif
icmpEngine.Close();
#if SQUID_SNMP
-
- snmpConnectionShutdown();
+ snmpConnectionClose();
#endif
asnFreeMemory();
htcpSocketClose();
#endif
-#if SQUID_SNMP
-
- snmpConnectionClose();
-#endif
-#if USE_DNSSERVERS
-
dnsShutdown();
-#else
-
- idnsShutdown();
-#endif
#if USE_SSL_CRTD
Ssl::Helper::GetInstance()->Shutdown();
#endif
icapLogOpen();
#endif
storeLogOpen();
-#if USE_DNSSERVERS
-
dnsInit();
-#else
-
- idnsInit();
-#endif
#if USE_SSL_CRTD
Ssl::Helper::GetInstance()->Init();
#endif
mimeInit(Config.mimeTablePathname);
+#if USE_UNLINKD
+ if (unlinkdNeeded())
+ unlinkdInit();
+#endif
+
#if USE_DELAY_POOLS
Config.ClientDelay.finalize();
#endif
mainRotate(void)
{
icmpEngine.Close();
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
dnsShutdown();
#endif
redirectShutdown();
icapLogRotate(); /*icap.log*/
#endif
icmpEngine.Open();
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
dnsInit();
#endif
redirectInit();
parseEtcHosts();
-#if USE_DNSSERVERS
-
dnsInit();
-#else
-
- idnsInit();
-
-#endif
-
#if USE_SSL_CRTD
Ssl::Helper::GetInstance()->Init();
#endif
if (!configured_once) {
#if USE_UNLINKD
- unlinkdInit();
+ if (unlinkdNeeded())
+ unlinkdInit();
#endif
urlInitialize();
if (!configured_once)
writePidFile(); /* write PID file */
-#ifdef _SQUID_LINUX_THREADS_
+#if defined(_SQUID_LINUX_THREADS_)
squid_signal(SIGQUIT, rotate_logs, SA_RESTART);
#endif
Ip::ProbeTransport(); // determine IPv4 or IPv6 capabilities before parsing.
+ Format::Token::Init(); // XXX: temporary. Use a runners registry of pre-parse runners instead.
+
parse_err = parseConfigFile(ConfigFile);
Mem::Report();
#endif
debugs(1, 1, "Shutting down...");
-#if USE_DNSSERVERS
-
dnsShutdown();
-#else
-
- idnsShutdown();
-#endif
#if USE_SSL_CRTD
Ssl::Helper::GetInstance()->Shutdown();
#endif
htcpSocketClose();
#endif
#if SQUID_SNMP
-
snmpConnectionClose();
#endif
#if USE_WCCP