]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
assign wais.c to debugging section 24
authorwessels <>
Sat, 30 Mar 1996 04:13:31 +0000 (04:13 +0000)
committerwessels <>
Sat, 30 Mar 1996 04:13:31 +0000 (04:13 +0000)
src/wais.cc

index 0969c2ad204b228becbb9ae47109246406a49bad..841fba7db90085743e13c619172fefc66305fec6 100644 (file)
@@ -1,4 +1,8 @@
-/* $Id: wais.cc,v 1.13 1996/03/28 20:42:48 wessels Exp $ */
+/* $Id: wais.cc,v 1.14 1996/03/29 21:13:31 wessels Exp $ */
+
+/*
+ * DEBUG: Section 24          wais
+ */
 
 #include "squid.h"
 
@@ -37,7 +41,7 @@ void waisReadReplyTimeout(fd, data)
     StoreEntry *entry = NULL;
 
     entry = data->entry;
-    debug(0, 4, "waisReadReplyTimeout: Timeout on %d\n url: %s\n", fd, entry->url);
+    debug(24, 4, "waisReadReplyTimeout: Timeout on %d\n url: %s\n", fd, entry->url);
     cached_error_entry(entry, ERR_READ_TIMEOUT, NULL);
     comm_set_select_handler(fd, COMM_SELECT_READ, 0, 0);
     comm_close(fd);
@@ -52,7 +56,7 @@ void waisLifetimeExpire(fd, data)
     StoreEntry *entry = NULL;
 
     entry = data->entry;
-    debug(0, 4, "waisLifeTimeExpire: FD %d: <URL:%s>\n", fd, entry->url);
+    debug(24, 4, "waisLifeTimeExpire: FD %d: <URL:%s>\n", fd, entry->url);
     cached_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     comm_set_select_handler(fd, COMM_SELECT_READ | COMM_SELECT_WRITE, 0, 0);
     comm_close(fd);
@@ -78,8 +82,8 @@ void waisReadReply(fd, data)
            /* check if we want to defer reading */
            if ((entry->mem_obj->e_current_len -
                    entry->mem_obj->e_lowest_offset) > WAIS_DELETE_GAP) {
-               debug(0, 3, "waisReadReply: Read deferred for Object: %s\n", entry->key);
-               debug(0, 3, "                Current Gap: %d bytes\n",
+               debug(24, 3, "waisReadReply: Read deferred for Object: %s\n", entry->key);
+               debug(24, 3, "                Current Gap: %d bytes\n",
                    entry->mem_obj->e_current_len -
                    entry->mem_obj->e_lowest_offset);
 
@@ -113,10 +117,10 @@ void waisReadReply(fd, data)
        }
     }
     len = read(fd, buf, 4096);
-    debug(0, 5, "waisReadReply - fd: %d read len:%d\n", fd, len);
+    debug(24, 5, "waisReadReply - fd: %d read len:%d\n", fd, len);
 
     if (len < 0 || ((len == 0) && (entry->mem_obj->e_current_len == 0))) {
-       debug(0, 1, "waisReadReply - error reading errno %d: %s\n",
+       debug(24, 1, "waisReadReply - error reading errno %d: %s\n",
            errno, xstrerror());
        if (errno == ECONNRESET) {
            /* Connection reset by peer */
@@ -186,7 +190,7 @@ void waisSendComplete(fd, buf, size, errflag, data)
 {
     StoreEntry *entry = NULL;
     entry = data->entry;
-    debug(0, 5, "waisSendComplete - fd: %d size: %d errflag: %d\n",
+    debug(24, 5, "waisSendComplete - fd: %d size: %d errflag: %d\n",
        fd, size, errflag);
     if (errflag) {
        cached_error_entry(entry, ERR_CONNECT_FAIL, xstrerror());
@@ -217,7 +221,7 @@ void waisSendRequest(fd, data)
     int len = strlen(data->request) + 4;
     char *buf;
 
-    debug(0, 5, "waisSendRequest - fd: %d\n", fd);
+    debug(24, 5, "waisSendRequest - fd: %d\n", fd);
 
     if (data->type)
        len += strlen(data->type);
@@ -231,7 +235,7 @@ void waisSendRequest(fd, data)
            data->mime_hdr, CR, LF);
     else
        sprintf(buf, "%s %s%c%c", data->type, data->request, CR, LF);
-    debug(0, 6, "waisSendRequest - buf:%s\n", buf);
+    debug(24, 6, "waisSendRequest - buf:%s\n", buf);
     icpWrite(fd, buf, len, 30, waisSendComplete, (caddr_t) data);
 }
 
@@ -246,14 +250,14 @@ int waisStart(unusedfd, url, type, mime_hdr, entry)
     int sock, status;
     WAISData *data = NULL;
 
-    debug(0, 3, "waisStart - url:%s, type:%s\n", url, type);
-    debug(0, 4, "            header: %s\n", mime_hdr);
+    debug(24, 3, "waisStart - url:%s, type:%s\n", url, type);
+    debug(24, 4, "            header: %s\n", mime_hdr);
 
     data = (WAISData *) xcalloc(1, sizeof(WAISData));
     data->entry = entry;
 
     if (!getWaisRelayHost()) {
-       debug(0, 0, "waisStart: Failed because no relay host defined!\n");
+       debug(24, 0, "waisStart: Failed because no relay host defined!\n");
        cached_error_entry(entry, ERR_NO_RELAY, NULL);
        safe_free(data);
        return COMM_ERROR;
@@ -266,7 +270,7 @@ int waisStart(unusedfd, url, type, mime_hdr, entry)
     /* Create socket. */
     sock = comm_open(COMM_NONBLOCKING, 0, 0, url);
     if (sock == COMM_ERROR) {
-       debug(0, 4, "waisStart: Failed because we're out of sockets.\n");
+       debug(24, 4, "waisStart: Failed because we're out of sockets.\n");
        cached_error_entry(entry, ERR_NO_FDS, xstrerror());
        safe_free(data);
        return COMM_ERROR;
@@ -275,7 +279,7 @@ int waisStart(unusedfd, url, type, mime_hdr, entry)
      * It should be done before this route is called. 
      * Otherwise, we cannot check return code for connect. */
     if (!ipcache_gethostbyname(data->host)) {
-       debug(0, 4, "waisstart: Called without IP entry in ipcache. OR lookup failed.\n");
+       debug(24, 4, "waisstart: Called without IP entry in ipcache. OR lookup failed.\n");
        comm_close(sock);
        cached_error_entry(entry, ERR_DNS_FAIL, dns_error_message);
        safe_free(data);
@@ -289,7 +293,7 @@ int waisStart(unusedfd, url, type, mime_hdr, entry)
            safe_free(data);
            return COMM_ERROR;
        } else {
-           debug(0, 5, "waisStart - conn %d EINPROGRESS\n", sock);
+           debug(24, 5, "waisStart - conn %d EINPROGRESS\n", sock);
        }
     }
     /* Install connection complete handler. */