]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Define ERR_COMM_CLOSING error status code to be used when the comm_write
authorwessels <>
Sun, 26 Oct 1997 09:33:16 +0000 (09:33 +0000)
committerwessels <>
Sun, 26 Oct 1997 09:33:16 +0000 (09:33 +0000)
callback is called from comm_close().

src/comm.cc
src/defines.h
src/ftp.cc

index cc5cd097a5a11745040c137228bbd102da974cfe..1f0956daf13a562448eea52ee0b78eb196af3a3f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.195 1997/10/26 01:46:08 wessels Exp $
+ * $Id: comm.cc,v 1.196 1997/10/26 02:33:17 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -569,7 +569,7 @@ comm_close(int fd)
     assert(F->open);
     assert(F->type != FD_FILE);
     BIT_SET(F->flags, FD_CLOSING);
-    CommWriteStateCallbackAndFree(fd, COMM_ERROR);
+    CommWriteStateCallbackAndFree(fd, COMM_ERR_CLOSING);
     commCallCloseHandlers(fd);
     if (F->uses)               /* assume persistent connect count */
        pconnHistCount(1, F->uses);
index 5c8b9347e082655196cdde66232249183f541894..3dce0fb78824016ab76e13f65722036732ebc153 100644 (file)
@@ -33,6 +33,7 @@
 #define COMM_INPROGRESS  (-6)
 #define COMM_ERR_CONNECT (-7)
 #define COMM_ERR_DNS     (-8)
+#define COMM_ERR_CLOSING (-9)
 
 #define COMM_NONBLOCKING  (0x1)
 #define COMM_NOCLOEXEC   (0x8)
index bf396aaabcf842c4dd2fa25c4449a024465425df..d29503ef2d2e1d0ad7e48a56a3f666f26a7230e9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.150 1997/10/25 17:22:42 wessels Exp $
+ * $Id: ftp.cc,v 1.151 1997/10/26 02:33:16 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -957,6 +957,8 @@ ftpWriteCommandCallback(int fd, char *buf, int size, int errflag, void *data)
     StoreEntry *entry = ftpState->entry;
     ErrorState *err;
     debug(9, 7) ("ftpWriteCommandCallback: wrote %d bytes\n", size);
+    if (errflag == COMM_ERR_CLOSING)
+       return;
     if (errflag) {
        debug(50, 1) ("ftpWriteCommandCallback: FD %d: %s\n", fd, xstrerror());
        if (entry->mem_obj->inmem_hi == 0) {