]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove store_status == STORE_PENDING checks everywhere and just put it
authorwessels <>
Sat, 16 Nov 1996 00:26:18 +0000 (00:26 +0000)
committerwessels <>
Sat, 16 Nov 1996 00:26:18 +0000 (00:26 +0000)
in squid_error_entry(); remove the debug_trap crap.

src/errorpage.cc
src/ftp.cc
src/gopher.cc
src/http.cc
src/store.cc
src/url.cc
src/wais.cc

index b55a940096e47c7f0247ccc3d06613c254ab912b..f2b25d8a5f2c0a67e54dae65d15956ea1d60db40 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.cc,v 1.51 1996/11/07 21:19:18 wessels Exp $
+ * $Id: errorpage.cc,v 1.52 1996/11/15 17:26:18 wessels Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -157,14 +157,10 @@ squid_error_entry(StoreEntry * entry, log_type type, const char *msg)
 {
     int error_index;
 
-    if (!entry) {
-       debug_trap("squid_error_entry: NULL entry");
+    if (entry == NULL)
        return;
-    }
-    if (entry->store_status != STORE_PENDING) {
-       debug_trap("squid_error_entry: store_status != STORE_PENDING");
+    if (entry->store_status != STORE_PENDING)
        return;
-    }
     if (type < ERR_MIN || type > ERR_MAX)
        fatal_dump("squid_error_entry: type out of range.");
     error_index = (int) (type - ERR_MIN);
index d697d8dfc336c59bfa96b83d1e02ff2bce671268..0e16bd0c13195ba97275ee2f8289a5bc44523cbf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.83 1996/11/15 07:51:08 wessels Exp $
+ * $Id: ftp.cc,v 1.84 1996/11/15 17:26:19 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -188,8 +188,7 @@ ftpLifetimeExpire(int fd, FtpStateData * data)
     StoreEntry *entry = NULL;
     entry = data->entry;
     debug(9, 4, "ftpLifeTimeExpire: FD %d: '%s'\n", fd, entry->url);
-    if (entry->store_status == STORE_PENDING)
-       squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
+    squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     comm_close(fd);
 }
 
@@ -409,10 +408,8 @@ ftpSendComplete(int fd, char *buf, int size, int errflag, void *data)
        buf = NULL;
     }
     if (errflag) {
-       if (entry->store_status == STORE_PENDING) {
-           squid_error_entry(entry, ERR_CONNECT_FAIL, xstrerror());
-           comm_close(fd);
-       }
+       squid_error_entry(entry, ERR_CONNECT_FAIL, xstrerror());
+       comm_close(fd);
        return;
     }
     commSetSelect(ftpState->ftp_fd,
index 9c38d80cfac0ec30cbe0765d84b4e51dcdda1526..ddd602d624df23435cd8d9645c02ed37f1f2d9a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: gopher.cc,v 1.67 1996/11/15 00:36:18 wessels Exp $
+ * $Id: gopher.cc,v 1.68 1996/11/15 17:26:20 wessels Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -695,8 +695,7 @@ gopherLifetimeExpire(int fd, GopherStateData * data)
     StoreEntry *entry = NULL;
     entry = data->entry;
     debug(10, 4, "gopherLifeTimeExpire: FD %d: '%s'\n", fd, entry->url);
-    if (entry->store_status == STORE_PENDING)
-       squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
+    squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     commSetSelect(fd,
        COMM_SELECT_READ | COMM_SELECT_WRITE,
        NULL,
index 4028683aff93ef0234e4cce75bf634dfce04f7db..7eec4304e45881b61f6ae9b731531a42e60ac160 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: http.cc,v 1.108 1996/11/15 07:51:09 wessels Exp $
+ * $Id: http.cc,v 1.109 1996/11/15 17:26:21 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -211,8 +211,7 @@ httpLifetimeExpire(int fd, void *data)
     HttpStateData *httpState = data;
     StoreEntry *entry = httpState->entry;
     debug(11, 4, "httpLifeTimeExpire: FD %d: '%s'\n", fd, entry->url);
-    if (entry->store_status == STORE_PENDING)
-       squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
+    squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     commSetSelect(fd, COMM_SELECT_READ | COMM_SELECT_WRITE, NULL, NULL, 0);
     comm_close(fd);
 }
index c79400ef97694b5f2ea28dc057946772e70e961a..e0e537aa6b21cce53a69b54c8883ffa9f3749aa0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.166 1996/11/15 00:36:23 wessels Exp $
+ * $Id: store.cc,v 1.167 1996/11/15 17:26:22 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -2833,7 +2833,7 @@ storeEntryValidToSend(StoreEntry * e)
 }
 
 int
-storeFirstClientFD(MemObject *mem)
+storeFirstClientFD(MemObject * mem)
 {
     int i;
     if (mem == NULL)
index e3ab2d70b98b7d3f4883a4e2685cbab7e8e9735a..8a2cd6aeb3b818df7f1a2d4ca13dc4227a24386c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.42 1996/11/15 00:36:24 wessels Exp $
+ * $Id: url.cc,v 1.43 1996/11/15 17:26:23 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -201,7 +201,7 @@ urlParse(method_t method, char *url)
     int l;
     proto[0] = host[0] = urlpath[0] = login[0] = '\0';
 
-    if ((l = strlen(url)) > (MAX_URL-1)) {
+    if ((l = strlen(url)) > (MAX_URL - 1)) {
        /* terminate so it doesn't overflow other buffers */
        *(url + (MAX_URL >> 1)) = '\0';
        debug(23, 0, "urlParse: URL too large (%d bytes)\n", l);
index 5675f2c68d2605d646d55eacea1d113eb7e05b32..07e0346638ce8955bffd9372a1b8dfadc5c3f959 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: wais.cc,v 1.57 1996/11/15 00:36:25 wessels Exp $
+ * $Id: wais.cc,v 1.58 1996/11/15 17:26:24 wessels Exp $
  *
  * DEBUG: section 24    WAIS Relay
  * AUTHOR: Harvest Derived
@@ -159,8 +159,7 @@ waisLifetimeExpire(int fd, WaisStateData * waisState)
 
     entry = waisState->entry;
     debug(24, 4, "waisLifeTimeExpire: FD %d: '%s'\n", fd, entry->url);
-    if (entry->store_status == STORE_PENDING)
-       squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
+    squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     commSetSelect(fd, COMM_SELECT_READ | COMM_SELECT_WRITE, NULL, NULL, 0);
     comm_close(fd);
 }