From 7612bf3302eef8a49658eaeca09504be588f6398 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 19 Jan 2017 14:54:39 -0800 Subject: Fix LZ4 warning. --- node/Packet.cpp | 2 +- node/Packet.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'node') diff --git a/node/Packet.cpp b/node/Packet.cpp index bdbc5fe4..6d1f49e8 100644 --- a/node/Packet.cpp +++ b/node/Packet.cpp @@ -125,7 +125,7 @@ bool Packet::compress() unsigned char buf[ZT_PROTO_MAX_PACKET_LENGTH * 2]; if ((!compressed())&&(size() > (ZT_PACKET_IDX_PAYLOAD + 32))) { int pl = (int)(size() - ZT_PACKET_IDX_PAYLOAD); - int cl = LZ4_compress((const char *)field(ZT_PACKET_IDX_PAYLOAD,(unsigned int)pl),(char *)buf,pl); + int cl = LZ4_compress_default((const char *)field(ZT_PACKET_IDX_PAYLOAD,(unsigned int)pl),(char *)buf,pl,ZT_PROTO_MAX_PACKET_LENGTH * 2); if ((cl > 0)&&(cl < pl)) { (*this)[ZT_PACKET_IDX_VERB] |= (char)ZT_PROTO_VERB_FLAG_COMPRESSED; setSize((unsigned int)cl + ZT_PACKET_IDX_PAYLOAD); diff --git a/node/Packet.hpp b/node/Packet.hpp index 5ecbecba..0ac5d9d3 100644 --- a/node/Packet.hpp +++ b/node/Packet.hpp @@ -34,11 +34,11 @@ #include "Utils.hpp" #include "Buffer.hpp" -#ifdef ZT_USE_SYSTEM_LZ4 -#include -#else +//#ifdef ZT_USE_SYSTEM_LZ4 +//#include +//#else #include "../ext/lz4/lz4.h" -#endif +//#endif /** * Protocol version -- incremented only for major changes -- cgit v1.2.3