]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tools.cc
Merged from trunk (r13515).
[thirdparty/squid.git] / src / tools.cc
index 324bdaab0d49b3cce78459fd5e5321c4c0ce027b..91f4b2d9634b656699ca85fa87370e89a8669bab 100644 (file)
@@ -102,8 +102,8 @@ releaseServerSockets(void)
 {
     // Release the main ports as early as possible
 
-    // clear both http_port and https_port lists.
-    clientHttpConnectionsClose();
+    // clear http_port, https_port and ftp_port lists
+    clientConnectionsClose();
 
     // clear icp_port's
     icpClosePorts();
@@ -1151,6 +1151,14 @@ getMyPort(void)
     }
 #endif
 
+    if ((p = FtpPortList) != NULL) {
+        // skip any special interception ports
+        while (p != NULL && p->flags.isIntercepted())
+            p = p->next;
+        if (p != NULL)
+            return p->s.port();
+    }
+
     debugs(21, DBG_CRITICAL, "ERROR: No forward-proxy ports configured.");
     return 0; // Invalid port. This will result in invalid URLs on bad configurations.
 }