]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix failed assertion
authorwessels <>
Mon, 2 Jun 1997 23:19:25 +0000 (23:19 +0000)
committerwessels <>
Mon, 2 Jun 1997 23:19:25 +0000 (23:19 +0000)
src/ftp.cc

index a52ae2102268a467bf642400a08b23e083aaecc8..bb13b9cbd1cdc2b607a8646d5aa36cb2625a6dd9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.116 1997/06/02 05:39:43 wessels Exp $
+ * $Id: ftp.cc,v 1.117 1997/06/02 17:19:25 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -1422,9 +1422,11 @@ static void
 ftpDataTransferDone(FtpStateData * ftpState)
 {
     debug(9, 3, "This is ftpDataTransferDone\n");
-    assert(ftpState->data.fd >= 0);
-    comm_close(ftpState->data.fd);
-    ftpState->data.fd = -1;
+    if (ftpState->data.fd > -1) {
+        comm_close(ftpState->data.fd);
+        ftpState->data.fd = -1;
+    }
+    assert(ftpState->ctrl.fd > -1);
     sprintf(cbuf, "QUIT\r\n");
     ftpWriteCommand(cbuf, ftpState);
     ftpState->state = SENT_QUIT;