]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3319: Inconsistencies in error messages
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 29 Aug 2011 03:47:54 +0000 (15:47 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 29 Aug 2011 03:47:54 +0000 (15:47 +1200)
src/HttpHeader.cc
src/client_side.cc
src/http.cc
src/icmp/Icmp4.cc
src/ssl/ssl_crtd.cc
src/tools.cc
src/wccp.cc
src/wccp2.cc

index 39cdc309434d4ebf87e2aef1c4380d934dc799d3..274505aee0946f063c9f6843fe3935d4b8a7ce14 100644 (file)
@@ -877,8 +877,7 @@ HttpHeader::addEntry(HttpHeaderEntry * e)
     assert_eid(e->id);
     assert(e->name.size());
 
-    debugs(55, 9, this << " adding entry: " << e->id << " at " <<
-           entries.count);
+    debugs(55, 7, HERE << this << " adding entry: " << e->id << " at " << entries.count);
 
     if (CBIT_TEST(mask, e->id))
         Headers[e->id].stat.repCount++;
@@ -900,8 +899,7 @@ HttpHeader::insertEntry(HttpHeaderEntry * e)
     assert(e);
     assert_eid(e->id);
 
-    debugs(55, 7, this << " adding entry: " << e->id << " at " <<
-           entries.count);
+    debugs(55, 7, HERE << this << " adding entry: " << e->id << " at " << entries.count);
 
     if (CBIT_TEST(mask, e->id))
         Headers[e->id].stat.repCount++;
index 0ef0442094db19033305cfc443b945e38de56267..0c14993c46f3effb38058230d6a93e1165dade28 100644 (file)
@@ -3420,7 +3420,7 @@ httpsAccept(int, const Comm::ConnectionPointer& details, comm_err_t flag, int xe
     if (!(ssl = httpsCreate(details, sslContext)))
         return;
 
-    debugs(33, 5, HERE << details << " accepted, starting SSL negotiation.");
+    debugs(33, 4, HERE << details << " accepted, starting SSL negotiation.");
     fd_note(details->fd, "client https connect");
 
     if (s->http.tcp_keepalive.enabled) {
index b740534d5a5493cce1103cfed24b264457cc76e5..96b90574c8aedc57fb27baec540e7cb8172356fe 100644 (file)
@@ -2212,12 +2212,12 @@ HttpStateData::finishingBrokenPost()
     }
 
     if (!Comm::IsConnOpen(serverConnection)) {
-        debugs(11,2, HERE << "ignoring broken POST for closed " << serverConnection);
+        debugs(11, 3, HERE << "ignoring broken POST for closed " << serverConnection);
         assert(closeHandler != NULL);
         return true; // prevent caller from proceeding as if nothing happened
     }
 
-    debugs(11, 2, "finishingBrokenPost: fixing broken POST");
+    debugs(11, 3, "finishingBrokenPost: fixing broken POST");
     typedef CommCbMemFunT<HttpStateData, CommIoCbParams> Dialer;
     requestSender = JobCallback(11,5,
                                 Dialer, this, HttpStateData::wroteLast);
index f506d7ace4852d54652017d04242f1b312236de4..5c24f6d23e77dac6a65b0bbcda446ea7c049f3cb 100644 (file)
@@ -141,7 +141,7 @@ Icmp4::SendEcho(Ip::Address &to, int opcode, const char *payload, int len)
     ((sockaddr_in*)S->ai_addr)->sin_port = 0;
     assert(icmp_pktsize <= MAX_PKT4_SZ);
 
-    debugs(42, 2, HERE << "Send ICMP packet to " << to << ".");
+    debugs(42, 5, HERE << "Send ICMP packet to " << to << ".");
 
     x = sendto(icmp_sock,
                (const void *) pkt,
index cf10d767fb309d2eaa30f786d740424d78539d05..354d62ef99d9ddf7011a38b7213edf6e1b8a2bc3 100644 (file)
@@ -123,6 +123,8 @@ static size_t parseBytesUnits(const char * unit)
     if (!strncasecmp(unit, B_GBYTES_STR, strlen(B_GBYTES_STR)))
         return 1 << 30;
 
+    std::cerr << "WARNING: Unknown bytes unit '" << unit << "'" << std::endl;
+
     return 0;
 }
 
index a53ec4b7a3b74ccfa49725f19b1a2c5426d0bbf3..b50c292c4cdbce8540382436a6a24de28a684807 100644 (file)
@@ -1050,7 +1050,7 @@ setSystemLimits(void)
 
 #if HAVE_SETRLIMIT && defined(RLIMIT_VMEM)
     if (getrlimit(RLIMIT_VMEM, &rl) < 0) {
-        debugs(50, 0, "getrlimit: RLIMIT_VMEM: " << xstrerror());
+        debugs(50, DBG_CRITICAL, "getrlimit: RLIMIT_VMEM: " << xstrerror());
     } else if (rl.rlim_max > rl.rlim_cur) {
         rl.rlim_cur = rl.rlim_max;     /* set it to the max */
 
@@ -1073,7 +1073,7 @@ squid_signal(int sig, SIGHDLR * func, int flags)
     sigemptyset(&sa.sa_mask);
 
     if (sigaction(sig, &sa, NULL) < 0)
-        debugs(50, 0, "sigaction: sig=" << sig << " func=" << func << ": " << xstrerror());
+        debugs(50, DBG_CRITICAL, "sigaction: sig=" << sig << " func=" << func << ": " << xstrerror());
 
 #else
 #if _SQUID_MSWIN_
index 33dac22e16756cd204d3062cefac211290eac9d3..cefcbe2286ea8796481e59b80fae095492cce8ed 100644 (file)
@@ -139,12 +139,12 @@ wccpConnectionOpen(void)
     }
 
     if ( !Config.Wccp.router.SetIPv4() ) {
-        debugs(1, 1, "WCCPv1 Disabled. Router " << Config.Wccp.router << " is not IPv4.");
+        debugs(80, DBG_CRITICAL, "WCCPv1 Disabled. Router " << Config.Wccp.router << " is not an IPv4 address.");
         return;
     }
 
     if ( !Config.Wccp.address.SetIPv4() ) {
-        debugs(1, 1, "WCCPv1 Disabled. Local address " << Config.Wccp.address << " is not IPv4.");
+        debugs(80, DBG_CRITICAL, "WCCPv1 Disabled. Local address " << Config.Wccp.address << " is not an IPv4 address.");
         return;
     }
 
index 4e952aa09ba59c173c350d617ff8d0349c37fef7..35aeb6c738e2d8fcfd8aea6b554c62fd4d74182f 100644 (file)
@@ -985,12 +985,12 @@ wccp2ConnectionOpen(void)
     debugs(80, 5, "wccp2ConnectionOpen: Called");
 
     if (wccp2_numrouters == 0 || !wccp2_service_list_head) {
-        debugs(80, 2, "WCCPv2 Disabled.");
+        debugs(80, 2, "WCCPv2 Disabled. No IPv4 Router(s) configured.");
         return;
     }
 
     if ( !Config.Wccp2.address.SetIPv4() ) {
-        debugs(80, 0, "WCCPv2 Disabled. " << Config.Wccp2.address << " is not an IPv4 address.");
+        debugs(80, DBG_CRITICAL, "WCCPv2 Disabled. Local address " << Config.Wccp2.address << " is not an IPv4 address.");
         return;
     }
 
@@ -2135,7 +2135,7 @@ parse_wccp2_service(void *v)
     service_id = GetInteger();
 
     if (service_id < 0 || service_id > 255) {
-        debugs(80, 0, "wccp2ParseServiceInfo: service info id " << service_id << " is out of range (0..255)");
+        debugs(80, DBG_CRITICAL, "ERROR: invalid WCCP service id " << service_id << " (must be between 0 .. 255)");
         self_destruct();
     }
 
@@ -2306,7 +2306,7 @@ parse_wccp2_service_info(void *v)
     service_id = GetInteger();
 
     if (service_id < 0 || service_id > 255) {
-        debugs(80, 1, "parse_wccp2_service_info: invalid service id " << service_id << " (must be between 0 .. 255)");
+        debugs(80, DBG_CRITICAL, "ERROR: invalid WCCP service id " << service_id << " (must be between 0 .. 255)");
         self_destruct();
     }