diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-11 20:16:24 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-11 20:16:24 +0000 |
commit | 32e3caa89ad805e0332e02b12523d9c3ed84a746 (patch) | |
tree | 2552ea26a2b95b4d5d02c54b0974fac9204082d1 | |
parent | 98cdc4b7aafff7137d07da3006fead78e7a9fd39 (diff) |
Damnit damnit damnit!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5937 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/extra/m_ziplink.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp index b755d7b40..882a14f56 100644 --- a/src/modules/extra/m_ziplink.cpp +++ b/src/modules/extra/m_ziplink.cpp @@ -273,10 +273,9 @@ class ModuleZLib : public Module { session->inbuf->AddData(compr, readresult); - int size = session->inbuf->GetFrame(compr, CHUNK); - while ((size) && (total_decomp < count)) + int size = 0; + while ((size = session->inbuf->GetFrame(compr, CHUNK)) != 0) { - session->d_stream.next_in = (Bytef*)compr; session->d_stream.avail_in = 0; session->d_stream.next_out = (Bytef*)(buffer + total_decomp); @@ -297,15 +296,10 @@ class ModuleZLib : public Module total_in_uncompressed += session->d_stream.total_out; 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); |