X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Ftools.cc;h=e924ed1724da208fdc1180dc830b8955f866b68f;hb=f8e4867b19deb674adb3d6c2456918e88cdbfb37;hp=19a61365cda368453eaaa86c5a4d4444f43fd041;hpb=6ee88490f030008e81b1a3eff09664f4d456989e;p=thirdparty%2Fsquid.git diff --git a/src/tools.cc b/src/tools.cc index 19a61365cd..e924ed1724 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -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. }