]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
have ftpSendComplete check store_status before calling squid_error_entry()
authorwessels <>
Sat, 2 Nov 1996 04:57:17 +0000 (04:57 +0000)
committerwessels <>
Sat, 2 Nov 1996 04:57:17 +0000 (04:57 +0000)
src/ftp.cc

index 91a0628702d6b51cebec8bc7fc2b8b2b2f2e16f3..7bf3fde69bbd5f603db50a8a8bdd15c94db373c6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.72 1996/11/01 07:43:43 wessels Exp $
+ * $Id: ftp.cc,v 1.73 1996/11/01 21:57:17 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -408,19 +408,20 @@ ftpSendComplete(int fd, char *buf, int size, int errflag, void *data)
        buf = NULL;
     }
     if (errflag) {
-       squid_error_entry(entry, ERR_CONNECT_FAIL, xstrerror());
-       comm_close(fd);
+       if (entry->store_status == STORE_PENDING) {
+           squid_error_entry(entry, ERR_CONNECT_FAIL, xstrerror());
+           comm_close(fd);
+       }
        return;
-    } else {
-       commSetSelect(ftpState->ftp_fd,
-           COMM_SELECT_READ,
-           (PF) ftpReadReply,
-           (void *) ftpState, 0);
-       commSetSelect(ftpState->ftp_fd,
-           COMM_SELECT_TIMEOUT,
-           (PF) ftpLifetimeExpire,
-           (void *) ftpState, Config.readTimeout);
     }
+    commSetSelect(ftpState->ftp_fd,
+       COMM_SELECT_READ,
+       (PF) ftpReadReply,
+       (void *) ftpState, 0);
+    commSetSelect(ftpState->ftp_fd,
+       COMM_SELECT_TIMEOUT,
+       (PF) ftpLifetimeExpire,
+       (void *) ftpState, Config.readTimeout);
 }
 
 static char *
@@ -644,7 +645,7 @@ ftpConnectDone(int fd, int status, void *data)
     if (opt_no_ipcache)
        ipcacheInvalidate(ftpData->request->host);
     if (Config.vizHackAddr.sin_port)
-        vizHackSendPkt(&ftpData->connectState.S, 2);
+       vizHackSendPkt(&ftpData->connectState.S, 2);
 }
 
 static void