]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tools.cc
Merged from trunk (r13356).
[thirdparty/squid.git] / src / tools.cc
index 19a61365cda368453eaaa86c5a4d4444f43fd041..e924ed1724da208fdc1180dc830b8955f866b68f 100644 (file)
@@ -103,8 +103,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();
@@ -1152,6 +1152,14 @@ getMyPort(void)
     }
 #endif
 
+    if ((p = Config.Sockaddr.ftp)) {
+        // skip any special interception ports
+        while (p && p->flags.isIntercepted())
+            p = p->next;
+        if (p)
+            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.
 }