From: wessels <> Date: Sat, 2 Nov 1996 04:57:17 +0000 (+0000) Subject: have ftpSendComplete check store_status before calling squid_error_entry() X-Git-Tag: SQUID_3_0_PRE1~5542 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df64e67e2e6ccad90296c94fb04ce153dac97ce3;p=thirdparty%2Fsquid.git have ftpSendComplete check store_status before calling squid_error_entry() --- diff --git a/src/ftp.cc b/src/ftp.cc index 91a0628702..7bf3fde69b 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -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