From: Amos Jeffries Date: Sun, 3 Aug 2014 11:08:15 +0000 (-0600) Subject: Enable compile-time override for MAXTCPLISTENPORTS X-Git-Tag: SQUID_3_4_7~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7deb4f534c801cac5c0764ebfe5919fd1b744aae;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 9553caeeb2..b6f0cd6a64 100644 --- a/src/anyp/PortCfg.h +++ b/src/anyp/PortCfg.h @@ -92,8 +92,10 @@ public: } // namespace AnyP +#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;