浏览代码

Added ZT_DISABLE_COMPRESSION build flag for SDK and low-end NAS builds

Joseph Henry 6 年之前
父节点
当前提交
6958ba9557
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      node/NetworkConfig.hpp

+ 6 - 2
node/NetworkConfig.hpp

@@ -276,10 +276,14 @@ public:
 	 */
 	 */
 	inline bool disableCompression() const
 	inline bool disableCompression() const
 	{
 	{
-#ifndef ZT_SDK
+#ifndef ZT_DISABLE_COMPRESSION
 		return ((this->flags & ZT_NETWORKCONFIG_FLAG_DISABLE_COMPRESSION) != 0);
 		return ((this->flags & ZT_NETWORKCONFIG_FLAG_DISABLE_COMPRESSION) != 0);
 #else
 #else
-		return false; // Compression is disabled for SDK builds since it doesn't play nice with lwIP
+		/* Compression is disabled for libzt builds since it causes non-obvious chaotic
+		interference with lwIP's TCP congestion algorithm. Compression is also disabled
+		for some NAS builds due to the usage of low-performance processors in certain
+		older and budget models. */
+		return false;
 #endif
 #endif
 	}
 	}