]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix debug(0,0) statements
authorwessels <>
Sun, 24 Aug 1997 06:37:03 +0000 (06:37 +0000)
committerwessels <>
Sun, 24 Aug 1997 06:37:03 +0000 (06:37 +0000)
src/http.cc
src/pconn.cc
src/peer_select.cc

index 828c2990902ccacfaa6c73661934d4c62e519e64..d0f251c6fe5307459a21405717cf544d13957bc0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: http.cc,v 1.183 1997/08/11 02:29:08 wessels Exp $
+ * $Id: http.cc,v 1.184 1997/08/24 00:37:03 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -566,10 +566,10 @@ httpPconnTransferDone(HttpStateData * httpState)
     /* return 1 if we got the last of the data on a persistent connection */
     MemObject *mem = httpState->entry->mem_obj;
     struct _http_reply *reply = mem->reply;
-    debug(0, 0) ("httpPconnTransferDone: FD %d\n", httpState->fd);
+    debug(11, 3) ("httpPconnTransferDone: FD %d\n", httpState->fd);
     if (!BIT_TEST(httpState->flags, HTTP_KEEPALIVE))
        return 0;
-    debug(0, 0) ("httpPconnTransferDone: content_length=%d\n",
+    debug(11, 5) ("httpPconnTransferDone: content_length=%d\n",
        reply->content_length);
     /*
      * !200 replies maybe don't have content-length, so
@@ -587,8 +587,8 @@ httpPconnTransferDone(HttpStateData * httpState)
      * If there is a content_length, see if we've got all of it.  If so,
      * then we can recycle this connection.
      */
-    debug(0, 0) ("httpPconnTransferDone: hdr_sz=%d\n", reply->hdr_sz);
-    debug(0, 0) ("httpPconnTransferDone: e_current_len=%d\n",
+    debug(11, 5) ("httpPconnTransferDone: hdr_sz=%d\n", reply->hdr_sz);
+    debug(11, 5) ("httpPconnTransferDone: e_current_len=%d\n",
        mem->e_current_len);
     if (mem->e_current_len < reply->content_length + reply->hdr_sz)
        return 0;
@@ -1020,7 +1020,7 @@ httpStart(request_t * request, StoreEntry * entry, peer * e)
            storeStartDeleteBehind(entry);
 #endif
        if ((fd = pconnPop(e->host, e->http_port)) >= 0) {
-           debug(0, 0) ("httpStart: reusing pconn FD %d\n", fd);
+           debug(11, 3) ("httpStart: reusing pconn FD %d\n", fd);
            httpState = httpBuildState(fd, entry, request, e);
            commSetTimeout(httpState->fd,
                Config.Timeout.connect,
@@ -1031,7 +1031,7 @@ httpStart(request_t * request, StoreEntry * entry, peer * e)
        }
     } else {
        if ((fd = pconnPop(request->host, request->port)) >= 0) {
-           debug(0, 0) ("httpStart: reusing pconn FD %d\n", fd);
+           debug(11, 3) ("httpStart: reusing pconn FD %d\n", fd);
            httpState = httpBuildState(fd, entry, request, e);
            commSetTimeout(httpState->fd,
                Config.Timeout.connect,
@@ -1060,7 +1060,7 @@ static void
 httpRestart(HttpStateData * httpState)
 {
     /* restart a botched request from a persistent connection */
-    debug(0, 0) ("Retrying HTTP request for %s\n", httpState->entry->url);
+    debug(11, 1) ("Retrying HTTP request for %s\n", httpState->entry->url);
     if (httpState->fd >= 0) {
        comm_remove_close_handler(httpState->fd, httpStateFree, httpState);
        comm_close(httpState->fd);
index 03419f6b65ba29e80299fdc2ea41be9e55f9230c..962950bd92855c2c44a14e8bbd360640fe5258dc 100644 (file)
@@ -1,3 +1,32 @@
+/*
+ * $Id: pconn.cc,v 1.3 1997/08/24 00:37:04 wessels Exp $
+ *
+ * DEBUG: section 48    Persistent Connections
+ * AUTHOR: Duane Wessels
+ *
+ * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
+ * --------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from the
+ *  Internet community.  Development is led by Duane Wessels of the
+ *  National Laboratory for Applied Network Research and funded by
+ *  the National Science Foundation.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  
+ */
 
 #include "squid.h"
 
@@ -32,7 +61,7 @@ pconnNew(const char *key)
 {
     struct _pconn *p = xcalloc(1, sizeof(struct _pconn));
     p->key = xstrdup(key);
-    debug(0, 0) ("pconnNew: adding %s\n", p->key);
+    debug(48, 3) ("pconnNew: adding %s\n", p->key);
     hash_join(table, (hash_link *) p);
     return p;
 }
@@ -42,7 +71,7 @@ pconnDelete(struct _pconn *p)
 {
     hash_link *hptr = hash_lookup(table, p->key);
     assert(hptr != NULL);
-    debug(0, 0) ("pconnDelete: deleting %s\n", p->key);
+    debug(48, 3) ("pconnDelete: deleting %s\n", p->key);
     hash_remove_link(table, hptr);
 }
 
@@ -55,7 +84,7 @@ pconnRemoveFD(struct _pconn *p, int fd)
            break;
     }
     assert(i < p->nfds);
-    debug(0, 0) ("pconnRemoveFD: found FD %d at index %d\n", fd, i);
+    debug(48, 3) ("pconnRemoveFD: found FD %d at index %d\n", fd, i);
     for (; i < p->nfds - 1; i++)
        p->fds[i] = p->fds[i + 1];
     if (--p->nfds == 0)
@@ -67,7 +96,7 @@ pconnTimeout(int fd, void *data)
 {
     struct _pconn *p = data;
     assert(table != NULL);
-    debug(0, 0) ("pconnTimeout: FD %d %s\n", fd, p->key);
+    debug(48, 3) ("pconnTimeout: FD %d %s\n", fd, p->key);
     pconnRemoveFD(p, fd);
     comm_close(fd);
 }
@@ -80,7 +109,7 @@ pconnRead(int fd, void *data)
     int n;
     assert(table != NULL);
     n = read(fd, buf, 256);
-    debug(0, 0) ("pconnRead: %d bytes from FD %d, %s\n", n, fd, p->key);
+    debug(48, 3) ("pconnRead: %d bytes from FD %d, %s\n", n, fd, p->key);
     pconnRemoveFD(p, fd);
     comm_close(fd);
 }
@@ -94,7 +123,7 @@ pconnInit(void)
 {
     assert(table == NULL);
     table = hash_create((HASHCMP *) strcmp, 229, hash_string);
-    debug(0, 0) ("persistent connection module initialized\n");
+    debug(48, 3) ("persistent connection module initialized\n");
 }
 
 void
@@ -107,7 +136,7 @@ pconnPush(int fd, const char *host, u_short port)
     if (p == NULL)
        p = pconnNew(key);
     if (p->nfds == PCONN_MAX_FDS) {
-       debug(0, 0) ("pconnPush: %s already has %d unused connections\n",
+       debug(48, 3) ("pconnPush: %s already has %d unused connections\n",
            key, p->nfds);
        close(fd);
        xfree(key);
@@ -116,7 +145,7 @@ pconnPush(int fd, const char *host, u_short port)
     p->fds[p->nfds++] = fd;
     commSetSelect(fd, COMM_SELECT_READ, pconnRead, p, 0);
     commSetTimeout(fd, Config.Timeout.pconn, pconnTimeout, p);
-    debug(0, 0) ("pconnPush: pushed FD %d for %s\n", fd, key);
+    debug(48, 3) ("pconnPush: pushed FD %d for %s\n", fd, key);
 }
 
 int
index 33251ce5819894034379bb3c26254e0e48a8ad1b..db3625152efe44c95af5286d9c46e407e40bb046 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.cc,v 1.24 1997/07/26 04:48:34 wessels Exp $
+ * $Id: peer_select.cc,v 1.25 1997/08/24 00:37:05 wessels Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -75,7 +75,7 @@ static void
 peerSelectStateFree(ps_state * psstate)
 {
     if (psstate->acl_checklist) {
-       debug(0, 0) ("calling aclChecklistFree() from peerSelectStateFree\n");
+       debug(44, 1) ("calling aclChecklistFree() from peerSelectStateFree\n");
        aclChecklistFree(psstate->acl_checklist);
     }
     requestUnlink(psstate->request);