From 98cdc4b7aafff7137d07da3006fead78e7a9fd39 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 11 Dec 2006 20:05:50 +0000 Subject: This should do it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5936 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ziplink.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp index c2f197042..b755d7b40 100644 --- a/src/modules/extra/m_ziplink.cpp +++ b/src/modules/extra/m_ziplink.cpp @@ -100,6 +100,7 @@ class CountedBuffer : public classbase buffer.pop_front(); } + amount_expected = 0; NextFrameSize(); return j; @@ -297,14 +298,14 @@ class ModuleZLib : public Module total_decomp += session->d_stream.total_out; + buffer[total_decomp] = 0; + ServerInstance->Log(DEBUG,"Decompressed %d bytes, total_decomp=%d: '%s'", session->d_stream.total_out, total_decomp, buffer); if (total_decomp < count) size = session->inbuf->GetFrame(compr, CHUNK); } - buffer[total_decomp] = 0; - ServerInstance->Log(DEBUG,"Complete buffer: '%s' size=%d", buffer, total_decomp); } return (readresult > 0); -- cgit v1.2.3