Re: /bzr/squid3/trunk/ r11986: Bug 3268: remove "Ready to serve requests." message

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Sat, 28 Jan 2012 09:22:35 +0100

What is the rest about? Very dense commit message for such large commit.

fre 2012-01-27 klockan 06:26 -0700 skrev Amos Jeffries:
> ------------------------------------------------------------
> revno: 11986
> fixes bug(s): http://bugs.squid-cache.org/show_bug.cgi?id=3268
> committer: Amos Jeffries <squid3_at_treenet.co.nz>
> branch nick: trunk
> timestamp: Fri 2012-01-27 06:26:59 -0700
> message:
> Bug 3268: remove "Ready to serve requests." message
> renamed:
> src/CommIO.h => src/DiskIO/DiskThreads/CommIO.h
> modified:
> src/DiskIO/DiskThreads/aiops.cc
> src/DiskIO/DiskThreads/aiops_win32.cc
> src/Makefile.am
> src/comm.cc
> src/err_type.h
> src/errorpage.cc
> src/errorpage.h
> src/main.cc
> src/tests/stub_CommIO.cc
> src/DiskIO/DiskThreads/CommIO.h
> vanligt textdokument-bilaga (r11986.diff)
> === renamed file 'src/CommIO.h' => 'src/DiskIO/DiskThreads/CommIO.h'
> --- a/src/CommIO.h 2008-03-22 00:58:20 +0000
> +++ b/src/DiskIO/DiskThreads/CommIO.h 2012-01-27 13:26:59 +0000
> @@ -1,5 +1,5 @@
> -#ifndef __COMMIO_H__
> -#define __COMMIO_H__
> +#ifndef SQUID_SRC_DISKIO_DISKTHREADS_COMMIO_H
> +#define SQUID_SRC_DISKIO_DISKTHREADS_COMMIO_H
>
> #include "fde.h"
>
> @@ -35,4 +35,4 @@
> }
> };
>
> -#endif
> +#endif /* SQUID_SRC_DISKIO_DISKTHREADS_COMMIO_H */
>
> === modified file 'src/DiskIO/DiskThreads/aiops.cc'
> --- a/src/DiskIO/DiskThreads/aiops.cc 2012-01-20 18:55:04 +0000
> +++ b/src/DiskIO/DiskThreads/aiops.cc 2012-01-27 13:26:59 +0000
> @@ -49,7 +49,7 @@
> #if HAVE_SCHED_H
> #include <sched.h>
> #endif
> -#include "CommIO.h"
> +#include "DiskIO/DiskThreads/CommIO.h"
> #include "SquidTime.h"
> #include "Store.h"
>
>
> === modified file 'src/DiskIO/DiskThreads/aiops_win32.cc'
> --- a/src/DiskIO/DiskThreads/aiops_win32.cc 2012-01-20 18:55:04 +0000
> +++ b/src/DiskIO/DiskThreads/aiops_win32.cc 2012-01-27 13:26:59 +0000
> @@ -36,7 +36,7 @@
>
> #include "squid-old.h"
> #include "squid_windows.h"
> -#include "CommIO.h"
> +#include "DiskIO/DiskThreads/CommIO.h"
> #include "DiskThreads.h"
> #include "SquidTime.h"
> #include "Store.h"
>
> === modified file 'src/Makefile.am'
> --- a/src/Makefile.am 2012-01-20 18:55:04 +0000
> +++ b/src/Makefile.am 2012-01-27 13:26:59 +0000
> @@ -173,7 +173,9 @@
> if USE_AIOPS_WIN32
> AIOPS_SOURCE = DiskIO/DiskThreads/aiops_win32.cc
> else
> -AIOPS_SOURCE = DiskIO/DiskThreads/aiops.cc
> +AIOPS_SOURCE = DiskIO/DiskThreads/aiops.cc \
> + DiskIO/DiskThreads/CommIO.cc \
> + DiskIO/DiskThreads/CommIO.h
> endif
>
> EXTRA_LIBRARIES = libAIO.a libBlocking.a libDiskDaemon.a libDiskThreads.a \
> @@ -284,7 +286,6 @@
> ClientRequestContext.h \
> clientStream.cc \
> clientStream.h \
> - CommIO.h \
> CompletionDispatcher.cc \
> CompletionDispatcher.h \
> CommRead.h \
> @@ -522,9 +523,7 @@
> $(SNMP_ALL_SOURCE) \
> $(UNLINKDSOURCE) \
> $(WIN32_ALL_SOURCE) \
> - $(LOADABLE_MODULES_SOURCES) \
> - DiskIO/DiskThreads/aiops.cc \
> - DiskIO/DiskThreads/aiops_win32.cc
> + $(LOADABLE_MODULES_SOURCES)
>
> noinst_HEADERS = \
> client_side_request.cci \
> @@ -835,6 +834,12 @@
> DiskIO/DiskThreads/DiskThreadsIOStrategy.cc \
> DiskIO/DiskThreads/DiskThreadsIOStrategy.h
>
> +EXTRA_libDiskThreads_a_SOURCES = \
> + DiskIO/DiskThreads/aiops.cc \
> + DiskIO/DiskThreads/aiops_win32.cc \
> + DiskIO/DiskThreads/CommIO.cc \
> + DiskIO/DiskThreads/CommIO.h
> +
> DiskIO_DiskDaemon_diskd_SOURCES = DiskIO/DiskDaemon/diskd.cc
> nodist_DiskIO_DiskDaemon_diskd_SOURCES = time.cc
> DiskIO_DiskDaemon_diskd_LDADD = \
> @@ -1432,8 +1437,6 @@
> $(REPL_OBJS) \
> $(SQUID_CPPUNIT_LA)
>
> -# tests/stub_CommIO.cc \
> -# tests/stub_comm.cc
> tests_testDiskIO_SOURCES = \
> CacheDigest.cc \
> cbdata.cc \
> @@ -2983,7 +2986,6 @@
> tests/testMain.cc \
> tests/testNull.h \
> tests/stub_internal.cc \
> - tests/stub_CommIO.cc \
> tests/stub_store_rebuild.cc \
> tests/stub_store_stats.cc \
> fd.cc \
>
> === modified file 'src/comm.cc'
> --- a/src/comm.cc 2012-01-20 18:55:04 +0000
> +++ b/src/comm.cc 2012-01-27 13:26:59 +0000
> @@ -45,7 +45,6 @@
> #include "comm/Loops.h"
> #include "comm/Write.h"
> #include "comm/TcpAcceptor.h"
> -#include "CommIO.h"
> #include "CommRead.h"
> #include "MemBuf.h"
> #include "pconn.h"
> @@ -1819,60 +1818,6 @@
> }
> }
>
> -void CommIO::Initialise()
> -{
> - /* Initialize done pipe signal */
> - int DonePipe[2];
> - if (pipe(DonePipe)) {}
> - DoneFD = DonePipe[1];
> - DoneReadFD = DonePipe[0];
> - fd_open(DoneReadFD, FD_PIPE, "async-io completetion event: main");
> - fd_open(DoneFD, FD_PIPE, "async-io completetion event: threads");
> - commSetNonBlocking(DoneReadFD);
> - commSetNonBlocking(DoneFD);
> - Comm::SetSelect(DoneReadFD, COMM_SELECT_READ, NULLFDHandler, NULL, 0);
> - Initialised = true;
> -}
> -
> -void CommIO::NotifyIOClose()
> -{
> - /* Close done pipe signal */
> - FlushPipe();
> - close(DoneFD);
> - close(DoneReadFD);
> - fd_close(DoneFD);
> - fd_close(DoneReadFD);
> - Initialised = false;
> -}
> -
> -bool CommIO::Initialised = false;
> -bool CommIO::DoneSignalled = false;
> -int CommIO::DoneFD = -1;
> -int CommIO::DoneReadFD = -1;
> -
> -void
> -CommIO::FlushPipe()
> -{
> - char buf[256];
> - FD_READ_METHOD(DoneReadFD, buf, sizeof(buf));
> -}
> -
> -void
> -CommIO::NULLFDHandler(int fd, void *data)
> -{
> - FlushPipe();
> - Comm::SetSelect(fd, COMM_SELECT_READ, NULLFDHandler, NULL, 0);
> -}
> -
> -void
> -CommIO::ResetNotifications()
> -{
> - if (DoneSignalled) {
> - FlushPipe();
> - DoneSignalled = false;
> - }
> -}
> -
> /// Start waiting for a possibly half-closed connection to close
> // by scheduling a read callback to a monitoring handler that
> // will close the connection on read errors.
>
> === modified file 'src/err_type.h'
> --- a/src/err_type.h 2011-12-30 16:01:37 +0000
> +++ b/src/err_type.h 2012-01-27 13:26:59 +0000
> @@ -52,9 +52,6 @@
> /* ICAP Errors */
> ERR_ICAP_FAILURE,
>
> - /* Cache Manager */
> - MGR_INDEX,
> -
> /* Squid problem */
> ERR_GATEWAY_FAILURE,
>
> @@ -62,7 +59,13 @@
> ERR_DIR_LISTING, /* Display of remote directory (FTP, Gopher) */
> ERR_SQUID_SIGNATURE, /* not really an error */
> ERR_SHUTTING_DOWN,
> - TCP_RESET,
> +
> + // NOTE: error types defined below TCP_RESET are optional and do not generate
> + // a log warning if the files are missing
> + TCP_RESET, // Send TCP RST packet instead of error page
> +
> + /* Cache Manager GUI can install a manager index/home page */
> + MGR_INDEX,
>
> ERR_MAX
> } err_type;
>
> === modified file 'src/errorpage.cc'
> --- a/src/errorpage.cc 2012-01-20 18:55:04 +0000
> +++ b/src/errorpage.cc 2012-01-27 13:26:59 +0000
> @@ -142,7 +142,7 @@
> class ErrorPageFile: public TemplateFile
> {
> public:
> - ErrorPageFile(const char *name): TemplateFile(name) { textBuf.init();}
> + ErrorPageFile(const char *name, const err_type code): TemplateFile(name,code) { textBuf.init();}
>
> /// The template text data read from disk
> const char *text() { return textBuf.content(); }
> @@ -195,7 +195,7 @@
> * (a) default language translation directory (error_default_language)
> * (b) admin specified custom directory (error_directory)
> */
> - ErrorPageFile errTmpl(err_type_str[i]);
> + ErrorPageFile errTmpl(err_type_str[i], i);
> error_text[i] = errTmpl.loadDefault() ? xstrdup(errTmpl.text()) : NULL;
> } else {
> /** \par
> @@ -210,7 +210,7 @@
>
> if (strchr(pg, ':') == NULL) {
> /** But only if they are not redirection URL. */
> - ErrorPageFile errTmpl(pg);
> + ErrorPageFile errTmpl(pg, ERR_MAX);
> error_text[i] = errTmpl.loadDefault() ? xstrdup(errTmpl.text()) : NULL;
> }
> }
> @@ -220,7 +220,7 @@
>
> // look for and load stylesheet into global MemBuf for it.
> if (Config.errorStylesheet) {
> - ErrorPageFile tmpl("StylesSheet");
> + ErrorPageFile tmpl("StylesSheet", ERR_MAX);
> tmpl.loadFromFile(Config.errorStylesheet);
> error_stylesheet.Printf("%s",tmpl.text());
> }
> @@ -265,7 +265,7 @@
> return NULL;
> }
>
> -TemplateFile::TemplateFile(const char *name): silent(false), wasLoaded(false), templateName(name)
> +TemplateFile::TemplateFile(const char *name, const err_type code): silent(false), wasLoaded(false), templateName(name), templateCode(code)
> {
> assert(name);
> }
> @@ -287,7 +287,7 @@
> /** test error_default_language location */
> if (!loaded() && Config.errorDefaultLanguage) {
> if (!tryLoadTemplate(Config.errorDefaultLanguage)) {
> - debugs(1, DBG_CRITICAL, "Unable to load default error language files. Reset to backups.");
> + debugs(1, (templateCode < TCP_RESET ? DBG_CRITICAL : 3), "Unable to load default error language files. Reset to backups.");
> }
> }
> #endif
> @@ -299,7 +299,7 @@
>
> /* giving up if failed */
> if (!loaded()) {
> - debugs(1, DBG_CRITICAL, "WARNING: failed to find or read error text file " << templateName);
> + debugs(1, (templateCode < TCP_RESET ? DBG_CRITICAL : 3), "WARNING: failed to find or read error text file " << templateName);
> parse("Internal Error: Missing Template ", 33, '\0');
> parse(templateName.termedBuf(), templateName.size(), '\0');
> }
> @@ -1231,7 +1231,7 @@
> assert(page_id > ERR_NONE && page_id < error_page_count);
>
> #if USE_ERR_LOCALES
> - ErrorPageFile *localeTmpl = NULL;
> + ErrorPageFile *localeTmpl = NULL;
>
> /** error_directory option in squid.conf overrides translations.
> * Custom errors are always found either in error_directory or the templates directory.
> @@ -1241,7 +1241,7 @@
> if (err_language && err_language != Config.errorDefaultLanguage)
> safe_free(err_language);
>
> - localeTmpl = new ErrorPageFile(err_type_str[page_id]);
> + localeTmpl = new ErrorPageFile(err_type_str[page_id], static_cast<err_type>(page_id));
> if (localeTmpl->loadFor(request)) {
> m = localeTmpl->text();
> assert(localeTmpl->language());
>
> === modified file 'src/errorpage.h'
> --- a/src/errorpage.h 2012-01-20 18:55:04 +0000
> +++ b/src/errorpage.h 2012-01-27 13:26:59 +0000
> @@ -254,7 +254,7 @@
> class TemplateFile
> {
> public:
> - TemplateFile(const char *name);
> + TemplateFile(const char *name, const err_type code);
> virtual ~TemplateFile() {}
>
> /// return true if the data loaded from disk without any problem
> @@ -301,6 +301,7 @@
> bool wasLoaded; ///< True if the template data read from disk without any problem
> String errLanguage; ///< The error language of the template.
> String templateName; ///< The name of the template
> + err_type templateCode; ///< The internal code for this template.
> };
>
> /**
>
> === modified file 'src/main.cc'
> --- a/src/main.cc 2012-01-26 14:52:35 +0000
> +++ b/src/main.cc 2012-01-27 13:26:59 +0000
> @@ -868,8 +868,6 @@
>
> writePidFile(); /* write PID file */
>
> - debugs(1, 1, "Ready to serve requests.");
> -
> reconfiguring = 0;
> }
>
> @@ -1171,8 +1169,6 @@
> Config.ClientDelay.finalize();
> #endif
>
> - debugs(1, 1, "Ready to serve requests.");
> -
> if (!configured_once) {
> eventAdd("storeMaintain", Store::Maintain, NULL, 1.0, 1);
>
>
> === modified file 'src/tests/stub_CommIO.cc'
> --- a/src/tests/stub_CommIO.cc 2012-01-20 18:55:04 +0000
> +++ b/src/tests/stub_CommIO.cc 2012-01-27 13:26:59 +0000
> @@ -1,5 +1,5 @@
> -#include "squid-old.h"
> -#include "CommIO.h"
> +#include "squid.h"
> +#include "DiskIO/DiskThreads/CommIO.h"
>
> #define STUB_API "CommIO.cc"
> #include "tests/STUB.h"
>
Received on Sat Jan 28 2012 - 08:23:15 MST

This archive was generated by hypermail 2.2.0 : Sun Jan 29 2012 - 12:00:09 MST