]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
protect squid_error_entry calls with check that store_status == STORE_PENDING
authorwessels <>
Fri, 15 Nov 1996 01:16:32 +0000 (01:16 +0000)
committerwessels <>
Fri, 15 Nov 1996 01:16:32 +0000 (01:16 +0000)
src/ftp.cc
src/gopher.cc
src/http.cc
src/wais.cc

index cc3350d021c05abf8b8a69f24303e4dd47b04f86..fb4b31d227df5156d020b1df963a81312e54734d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.79 1996/11/12 22:37:04 wessels Exp $
+ * $Id: ftp.cc,v 1.80 1996/11/14 18:16:32 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -187,7 +187,8 @@ ftpLifetimeExpire(int fd, FtpStateData * data)
     StoreEntry *entry = NULL;
     entry = data->entry;
     debug(9, 4, "ftpLifeTimeExpire: FD %d: '%s'\n", fd, entry->url);
-    squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
+    if (entry->store_status == STORE_PENDING)
+       squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     comm_close(fd);
 }
 
index 1cbdd6e647d81cebc99806175fe18d3a8bf32665..d8395d62024e99c796410d8be0aa12123806d1ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: gopher.cc,v 1.63 1996/11/06 23:14:36 wessels Exp $
+ * $Id: gopher.cc,v 1.64 1996/11/14 18:16:32 wessels Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -695,7 +695,8 @@ gopherLifetimeExpire(int fd, GopherStateData * data)
     StoreEntry *entry = NULL;
     entry = data->entry;
     debug(10, 4, "gopherLifeTimeExpire: FD %d: '%s'\n", fd, entry->url);
-    squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
+    if (entry->store_status == STORE_PENDING)
+       squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     commSetSelect(fd,
        COMM_SELECT_READ | COMM_SELECT_WRITE,
        NULL,
index 39a3e69442e81a7f13d6f3413c73e78dc742a6b1..22565e410c25b7ed5f0f63eb7e9b18182a7ab442 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: http.cc,v 1.103 1996/11/14 03:00:53 wessels Exp $
+ * $Id: http.cc,v 1.104 1996/11/14 18:16:33 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -209,7 +209,8 @@ httpLifetimeExpire(int fd, void *data)
     HttpStateData *httpState = data;
     StoreEntry *entry = httpState->entry;
     debug(11, 4, "httpLifeTimeExpire: FD %d: '%s'\n", fd, entry->url);
-    squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
+    if (entry->store_status == STORE_PENDING)
+       squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     commSetSelect(fd, COMM_SELECT_READ | COMM_SELECT_WRITE, NULL, NULL, 0);
     comm_close(fd);
 }
index 7f03557c2e1dc291295c59c5bb19b83f15167f05..4b0db871a4d1570722826b35d5e59bc8e8d78b1e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: wais.cc,v 1.53 1996/11/06 23:15:07 wessels Exp $
+ * $Id: wais.cc,v 1.54 1996/11/14 18:16:34 wessels Exp $
  *
  * DEBUG: section 24    WAIS Relay
  * AUTHOR: Harvest Derived
@@ -159,7 +159,8 @@ waisLifetimeExpire(int fd, WaisStateData * waisState)
 
     entry = waisState->entry;
     debug(24, 4, "waisLifeTimeExpire: FD %d: '%s'\n", fd, entry->url);
-    squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
+    if (entry->store_status == STORE_PENDING)
+       squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
     commSetSelect(fd, COMM_SELECT_READ | COMM_SELECT_WRITE, NULL, NULL, 0);
     comm_close(fd);
 }