From: Amos Jeffries Date: Tue, 29 Jul 2014 10:28:17 +0000 (+1200) Subject: Enable compile-time override for MAXTCPLISTENPORTS X-Git-Tag: SQUID_3_5_0_1~131 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29fd5407790e2cdf79672e8087ae7b8f1daf2576;p=thirdparty%2Fsquid.git Enable compile-time override for MAXTCPLISTENPORTS MAXTCPLISTENPORTS controls the permitted number of http(s)_port which may be configured. The hard-coded default is 128 ports. This patch enables the use of CXXFLAGS="-DMAXTCPLISTENPORTS=n" to set a new limit when building Squid. --- diff --git a/src/anyp/PortCfg.h b/src/anyp/PortCfg.h index 50366523ed..a27f08f265 100644 --- a/src/anyp/PortCfg.h +++ b/src/anyp/PortCfg.h @@ -106,8 +106,10 @@ extern AnyP::PortCfgPointer HttpPortList; extern AnyP::PortCfgPointer HttpsPortList; #endif +#if !defined(MAXTCPLISTENPORTS) // Max number of TCP listening ports #define MAXTCPLISTENPORTS 128 +#endif // TODO: kill this global array. Need to check performance of array vs list though. extern int NHttpSockets;