Show a debugging message when we have an error reading

This commit is contained in:
Scott Wheeler 2015-01-04 20:13:24 +01:00
parent caa53e8de5
commit 57729b834a

View File

@ -274,13 +274,14 @@ ByteVector Frame::fieldData(const ByteVector &frameData) const
int result = inflate(&stream, Z_NO_FLUSH);
if(result == Z_STREAM_ERROR)
return ByteVector();
else if(result == Z_NEED_DICT ||
result == Z_DATA_ERROR ||
result == Z_MEM_ERROR)
if(result == Z_STREAM_ERROR ||
result == Z_NEED_DICT ||
result == Z_DATA_ERROR ||
result == Z_MEM_ERROR)
{
inflateEnd(&stream);
if(result != Z_STREAM_ERROR)
inflateEnd(&stream);
debug("Error reading compressed stream");
return ByteVector();
}